ESP8266 nodemcu, esphome[2023.12.5] controls dusk to dawn lights. I need it to sync time once a day then sleep (wifi.disable).
I tried this but if the esp happened to not be connected to wifi at dusk/dawn, it fails to execute sunrise/sunset actions. As if the esp doesnt retain the time clock when the sync fails because the WIFI is disabled?
interval:
- interval: 24 hr
then:
- wifi.enable
- delay: 10 min
- wifi.disable
time:
- platform: homeassistant
id: homeassistant_time
sun:
latitude: 42.588081
longitude: -87.822899
on_sunset:
- then:
- delay: 30 min
- switch.turn_on:
id: lights
on_sunrise:
- elevation: -18°
then:
- switch.turn_off:
id: lights
maybe an option to trigger a sync when wifi is on? something like
interval:
- interval: 24 hr
then:
- wifi.enable
- time.sync #i know this is not an option but hoping to find something similar
- delay: 10 min
- wifi.disable