ESPHOME Time and Sun Components

I’m looking to push all my automations from Homeassistant to ESPHome to avoid issues that arise when WiFi is disconnected or HA is down. Some of my automations use the Time and Sun components (e.g switch lights on 30 mins after sunset). So, my question is, what would happen to these automations if the ESPHome device (Sonoff Basic) is disconnected from the WiFi - potentially for an extended period of time - would they still run albeit not recently synchronised or would they just not run?

If ESPHome is disconnected from Wifi for longer than the timeout period it reboots to attempt to re-establish a connection. You can disable this but your board may not reconnect:

reboot_timeout ( Optional , time): The amount of time to wait before rebooting when no WiFi connection exists. Can be disabled by setting this to 0s , but note that the low level IP stack currently seems to have issues with WiFi where a full reboot is required to get the interface back working. Defaults to 15min .

Thanks for this, unfortunately it doesn’t answer my question (although it may answer another question I have not yet got to). So, in general, what happens to automations that depend on time synchronisation if the link between HA and ESPHome is broken (because HA is down, because WiFi is lost or, probably most common reason, ESPHome is disconnected from API).

Your automations will run for the timeout period then stop as the ESP goes into a boot loop trying to re-establish a wifi connection.

Also the home assistant integrations will become unavailable very soon after losing the wifi link. What that does to your automations depends on how you’ve written them.

The sun component needs gps coordinates and time.

Only the time component needs WiFI but I don’t know how long it will run without WiFi. You will need to test and post your results here :slight_smile: