I am observing weird behavior for some months that I tracked down to shellies that are turning on/off after Home Assistant restart or apparently after some “clean up” process. One might not be worried by having shelly switch being turned off after the HA restart, however, in some configurations I have shelly in the wall behind the physical switch and zigbee lights I am turning on using an automation that is triggered by the toggle of the shellies in the wall. Especially I connected a shelly module to my six physical rockers/switches in the hall that were connected to a relay. I connected shelly to the relay and turn on zigbee lights in the hall by an automation.
First, the behavior after HA restarts switches all groups on/off for example. Based on what rule is beyond me. This is by default?
Second, I tracked down that almost every shelly (funny, not every but almost every, what is the rule which one is beyond me) goes through this what looks like some clean up process. However, it ends by turning on/off the switch. That apparently makes a party lighting in our home.
Any ideas how to force shelly modules to NOT turn on/off when it checks all the other sensors? Shelly modules are configured to remain in the previous state after restart. However, if the state is OFF, it also switches to OFF and triggers the automation.
These will be changing from unknown to off (or on, depending on the last state) at start up. So all you have to do is include from: 'on' in your state trigger to ignore this.
@tom_l I migrated from Deconz to zigbee2mqtt and found similar behavior. Right now, after every restart of Home Assitant my light in the food store lights up when the doors are open. The automation is focused on the “device” of the Aqara door sensor and it is “opened” after restart. It did not behave the same way on Deconz. The solution was to follow the state of an entity from off to on. I don’t think this is intended behavior and it seems to be similar to the one with shellies above.
Look the sensor changes after restart from open to open. Unnecessarily.