Tasmota switch turns off immediately after switching on

Hi
I just loaded the latest HA software on a pi and trying to switch on a sonoff ( Tasmota). I loaded the MQTT Mosquito broker addon to HA.
When click on the switch the switch slides back to the off position.
Do you have to use password and username for MQTT broker and tasmota ?
Pls can give any ideas that may be wrong

Thanks

I don’t use Hassio so I don’t use the MQTT add-on but I assume using best practices there should be a username and password required.

Are HA and the Sonoff able to connect to the broker?

And without knowing the code you used to configure the sonoff in HA it’s impossible to help you any further.

1 Like