Hello! I have a 8 recessed lights with Esphome on them. I want them to work as normal lights if for some reason my network is down. I normally toggle it via wifi, so the switch stays on. It works great, no issues, light turns on with the switch.
The issue is, randomly the device reboots on its own, so it turns on for no reason. Is there a way to prevent the light turning on from these random reboots?
I am assuming the reboot is due to this FAQ: " ESPHome reboots on purpose when something is not going right, e.g. wifi connection cannot be made or api connection is lost or mqtt connection is lost. So if you are facing this problem you’ll need to explicitly set the reboot_timeout option to 0s on the components being used.
You are explicitly turning the light on after each reboot…
The restore mode you chose to use will attempt to restore previous state and initialize it as On if it cant restore last state.
Loose the entire on_boot automation. Its all completely unnecessary and not what its meant to be used for. Case and point, its contradicting your light restore mode setting. If it restores its previous state as Off, then here comes your on_boot automation and turns it On, overwriting restore mode.
My only concern is if for some reason my system is down, I want to be able to turn on the lights via power cycle still with the switch. If I do restore state, they will stay off during power cycle via the switch if they were previously off.
I am not worried about the light staying on during reboot. I am just wanting to ensure the light turns on if the power cycle was caused by actual power cut and turned back on.
Essentially, I am wondering if there is a way to distinct between a power reset vs a reboot on the on_boot section.
So if the light is Off and you lose power, you want the light to turn On aftet it starts up but, if you manually restart it then you want it to restore whatever its last state was?