Go to your sonoff console and enter SetOption19 1
This turns on auto discover.
Then in HA go to Configuration > Integrations > MQTT .
Magic
Go to your sonoff console and enter SetOption19 1
This turns on auto discover.
Then in HA go to Configuration > Integrations > MQTT .
Magic