Home Assistant turning on lights/activating scenes at startup

I’ve been running hassio for a few weeks now with great success. Over the past couple of days I’ve noticed some odd behavior anytime I reboot HA. When HA comes back up, it turns on a bunch of lights and then runs a couple of scenes. Here is a picture from the logbook

HA_startup

Is there a setting somewhere that is causing HA to attempt to restore state or something? Has anyone seen this before? What am I missing. It’s driving me crazy as I am still making allot of changes and every time I reboot I have to go reset all my lights.

I think I see the issue (I just have to post a question to figure it out. I’m using Insteon MQTT and it is set up to retain messages. This is all well and good as I want HA to get the right states on boot, but the two automations (Movie On, and Goodnight) have a trigger type of MQTT and are looking for the payload of the topic to be OFF. I have the buttons that trigger those two scenes set to always send OFF (so they don’t light up when they are pressed). The downside of this is that when the retained message is read, it triggers the automation. Not sure how to deal with this. Can retained messages be disabled for certain topics?

Just to close the loop on this in case anyone else runs into it.

To keep this from happening, I publish “ON” to the topic at the end of my automation like this

payload: 'ON'
qos: 1
retain: true
topic: insteon/56.03.81/state/6

The topic will remain true until the button is pushed again so on reboot the retained state will be on and the automation will not fire.

I am having the same issue!! As well as, random light turn on throughout the day. From the logbook all the information I get is “Galley 10 turned on triggered by service light.turn_on
15:30:08 - 7 minutes ago” It doesn’t tell me how this was turned on. If I am commanding an event my name is listed after the time stamp.

I have eliminated all automations and cannot figure out why lights are turning on or off randomly!?

Your post is from a couple years ago, can you provide some more detail on how you resolved this?

I think your issue is different. Mine only occurred when I did a restart on HA. It turned out to be a retained MQTT message that was causing an automation to trigger. Sounds like your issue is more random.

I have this happen when I restart HA as well. How do I trouble shoot the MQTT?

Thx