Flash with Tasmota firmware
Follow instructions on Sonoff-Tasmota installation user guide.
Once flashed with new firmare, go to the device web page and configure MQTT as describe at Sonoff-Tasmota MQTT configuration.
Enter your MQTT broken information and fill the Topic field with the expected unique device identifier.
Once saved, go back to Gladys -> Integration -> Sonoff -> Discover devices page and you should see your new device.