Switches turning on and off randomly

Hi Guys,

Its my first post so hopefully I have it in the right section. I have a bunch of Sonoff Basics flashed with tasmota. I have them each added in my config as follows:

mqtt:
broker: ------
username: mqtt
password: ------

switch 2:
platform: mqtt
name: “Fireplace Lights”
command_topic: “cmnd/fireplace_lights/power”
state_topic: “stat/fireplace_lights/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true

switch 3:
platform: mqtt
name: “Entrance Downlights”
command_topic: “cmnd/Entrance_Downlights/power”
state_topic: “stat/Entrance_Downlights/POWER”
qos: 1
payload_on: “ON”
payload_off: “OFF”
retain: true

and so on. I have had two installed for a few weeks with no issues at all. I added 7 more this evening and everything seemed to be working okay. Turning on and off ect. but now lights are turning on and off randomly. When i go into the console of a particular switch as I notice it turning on by itself it says its from MQTT, see below:

“01:02:15 MQT: tele/fireplace_lights/STATE = {“Time”:“2020-04-02T01:02:15”,“Uptime”:“0T07:05:12”,“UptimeSec”:25512,“Heap”:28,“SleepMode”:“Dynamic”,“Sleep”:50,“LoadAvg”:19,“MqttCount”:4,“POWER”:“OFF”,“Wifi”:{“AP”:1,“SSId”:“blank Network_2.4”,“BSSId”:“18:E8:29:C1:D4:38”,“Channel”:1,“RSSI”:96,“Signal”:-52,“LinkCount”:3,“Downtime”:“0T00:01:40”}}”

The switches that have previously working with no issues are also affected. I have Hass.io installed on a rasberry pi and mosquitto broker running on that. I was playing around in node red when i noticed it but some of the switches affected are not in my flow so I don’t think thats the issue.

Any help or ideas would be greatly appreciated!

This video will fix all of your problems. And explain it in great detail.

And please read this post and format your config so people can help you.

Cheers for the help!