If Home Assistant is restarted, all automations are restarted.
That means that if any automation is in progress, such as waiting for a delay to expire or a wait_for_trigger to trigger, it’s cancelled and the balance of the automation’s actions are never executed. For example, scene.corridoio_before is never turned on.
In addition, any snapshot scenes that were created before the restart are gone after startup.
That would be good except it’s not during restarts. It can happen at any random point in the day. My automations react to Zabbix alerts so I can get quite a few in the day and sometimes random lights will remain red/green and others will revert to the previous state.
My reply was to the topic’s author, who explained it happens “once a month, apparently randomly”. They’ll have to determine if their system did/didn’t restart at the time of the incident.
In your case, I don’t know what might be causing the problem.
I merely clarified that my post wasn’t meant to offer a potential explanation for everyone’s problems, just for the first post.
I just noticed that ste.luci amended the first post to include:
no restarts and no config changes happened during these malfunctioning
In that case, the cause of ste.luci’s problem may be a random and temporary communication failure where the transmitted command is not received by the device. Determining if that’s the actual cause can be challenging (owing to its random nature).
Maybe (maybe!!!) I found the reason.
Some lights occasionally become unavailable (no idea why).
It seems like when this happens during the automation timeout, the lights are not switched off.
I temporarily solved the issue with another automation:
if the light state changes from unavailable to anything else
and the corresponding sensor is clear
then switch the light off