Since latest update, Homeassistant turns off or on constantly lights

Hi all

I am migrating from Openhab to Homeassistant and thought I am on a good way. Most of my devices are MQTT and I added a voice assistant (alexa) which works perfectly.

ISSUE I have now
Since I upgraded homeassistant to the latest version (I was like 2 versions behind) it started persistently to either turn off lights of rooms or turn on.
=> for example it turned on the lights of my office all 2 min on (between 1-2min)
=> or it turned off the lights in the cellar between 10sec and 30sec where my wife worked
=> or my son cam at 1am to me and said “please stop turning on the light”

I HAD TO TURN OFF NOW HOMEASSISTANT… I found it funny… my family somehow not…

What I tested

  • First I thought is was the EMqx, so I turned it off… no change
  • then I turned it on again and thought I need to disable retain… no change
  • then I turned off homeassistant… THAT HELPED
  • then I changed in office the mqtt cmnd string … no change
  • then I thought it is Alexa, I disconnected it comepletely… no change
  • then I deleted all devices from Alexa… no change
  • then I disconnected HA from Internet… thought i got hacked… no change
    => I believe that homeassistant does over rpc contact my shelly and onoff and turn it to a state that homeassistant believes is the right one

You can imagine that I can do only limited tests while my family is here… what should I do?

  • Downgrade?
  • check logs?
  • setup from 0?

How would you approach the error finding… I am sure it started since I upgraded to the latest version but if I do not want to get killed, I need to know what I test before I turn HA again haha :slight_smile:

In configuration.yaml, set your mqtt log to highest level

logger:
#  default: error
  logs:
    homeassistant.components.mqtt: info

restart HA
check logs

Thanks Francis

I will try this and report what it says but I doubt that it can be this because…

It can not be MQTT as this continued to happen, while MQTT server was down and I even changed the commands in YAML to XXCMND/xxx/xxx, to see any commands going out in explorer
=> The only thing I can think off, is that the devices get a retain info from HA? But while MQTT server is down, this can’t be no?

Anyhow, I will try what you proposed!

I just saw now a new update… 2025.1.4 and installed it.
=> now things seems to work… I keep my fingers crossed :slight_smile: