I have Wi-Fi relays (Sonoff Basic for instance, flashed with ESPHome) that connect to my Wi-Fi. My Wi-Fi may be down, or the device may not want to connect (because, say, the Wi-Fi password was changed) and I would like to build the following configuration:
try to connect to a known SSID, say for 5 minutes
then open a ad-hoc hotspot (so that I can connect to the device), for, say 5 minutes
then try again the SSID for 5 minutes
and then the hotspot
etc.
Is this possible?
The documentation mentions several timeouts, but I did not find a way to create such a continuous loop
I confirm what Holdestmade says - what you describe is default wifi behaviour for ESPHome. You only need to set the AP timeout.
Wifi will continuously search for the known SSID(s) though, no timeout needed for that.
Yes I think so. 15 minutes is the default for reboot_timeout, output_power default is 20 and fast_connect is default off so no need to specify those. And priority is only needed for multiple SSIDs (and default is 0)
My configuration is much shorter as it only addresses the non-default values. This is the output from ESPHome verification that dumps all possible entries.