Tom, thanks for this! I “took the liberty” to use your solution in my setup, too. However, i modified it a bit, so i get a blinking led. I guess that as a side effect i’ll get a visual indication if by any chance module freezes (led will stop blinking).
interval:
- interval: 1s
then:
if:
condition:
wifi.connected:
then:
- switch.turn_on: test_wifi_connected
- delay: 500ms
- switch.turn_off: test_wifi_connected
else:
- switch.turn_off: test_wifi_connected