I’ve had to rebuild my HA server recently and this has meant it being unavailable for a couple of houres at a time.
During that time I noticed odd behaviour with a couple of ESPHome devices - coincidentally both flashed sonoff inline or plug switches. After about 20 minutes of my HA server being offline, they just switched off. I switched them back on, only for them to shut down again.
Is this expected behaviour? Are they supposed to switch off if they lose sight of the HA server they’re normally connected to? Is there a way of preventing this in future?
I made the same observation when my HomeAssistant was down for a while.
Using the code:
reboot_timeout: 0s
at the api block prevents this.
reboot_timeout** (Optional, Time): The amount of time to wait before rebooting when no client connects to the API. This is needed because sometimes the low level ESP functions report that the ESP is connected to the network, when in fact it is not - only a full reboot fixes it. Can be disabled by setting this to 0s. Defaults to 15min.