Hi everyone, I’m running HA in Hyper-V for some months now and not sure if this is normal behavior.
I have a simple automation that turns the light on at night and then off again in the morning based on the sun’s position and dusk.
I noticed that sometimes (not always) when I update HA or reboot the PC that runs HA, at night, after the lights turned on already, they will not turn off again in the morning.
The automation works perfectly fine for months, unless I reboot the system or the power goes out for a few minutes and then comes on again. Otherwise, it works fine. It seems that when I reboot the system for updates, or upgrade HA or another reason, for a reboot or update, it then somehow skips the automation that turns the light off again. For this reason, now I tried to avoid updating HA at night or rebooting the system unless it’s on the day and the automation to turn the light on has not run yet. The strange thing is that both automations are separated, so they are not supposed to depend on each other for the state.
I cannot actually replicate this exactly, since its not always true but I noticed this only happens on reboots as it HA loses it state somehow. I noticed the lights on at the morning way past its time and had to turn them off manually at least 4 or 5 times in the past month, and every time it was because I either updated HA or rebooted the system.
If I reboot the system or update HA at a day, it works fine, lights always turn on and then off again and this only seems to happen when I am rebooting HA or the VM running it.
I’m thinking of creating a second automation turn off at the morning automation after one hour or 2 as fail check or maybe another way to re-check if the automation was executed?
When this happens, I do see in the history that the automation does not run. This seems a bit redundant to add a second automation again just in case, but I’m curious why this happens only when HA is restarted. Maybe someone with more experience can tell me how to debug this or what I can do to make sure automation does run even if I reboot the system.