ESPHome ESP8266 deep sleep prevent until wifi connection available

Hello community,
Is there a way without MQTT to prevent an ESP 8266 from deep sleeping until it has established an API or WiFi connection?

So: ESP On => Check Wifi => connection ok => send values => go to deep sleep or

ESP On => Check Wifi => connection faulty => stay online until connection established => send values => go to deep sleep

I can’t figure it out from the forum entries and the documentation, as they all refer to MQTT.

Thanks for the help :smiley:


api.connected Condition :point_left:

This Condition checks if at least one client is connected to the ESPHome native API. Please note client not only includes Home Assistant, but also ESPHome’s OTA log output if logs are shown remotely.

I’d better delete this thread very quickly, it’s embarrassing that I was so blind 🫡
Many Thanks