Unavailable entities question!


I have two Wi-Fi relays outside that occasionally stay unavailable. These relays have also a RF receiver and I can control them using the BroadLink Hub. The question is the following: it is possible to have a button that use the wi-fi entity if available, and if not, call a script (to use the RF). Thanks in advance for your help.

You can use a choose setup in an automation and call that with the button.
You just need a sensor to base your choose setup on, which tells the automation if the WiFi is available or not.
This sensor could be manually set, ping, snmp or maybe a smartplug.

1 Like

I think I understood… the button will call an automation and then based on the state (available or unavailable) will take the desire action. I’m using the nmap integration to check if they are online or not.
I need to test that. Thank you.

Yes, your sugestion worked but instead of an automation I‘ve created a script with a choose / conditions to implement the if statement and when the switch is unavailable state send an RF command otherwise use the homeassistant.turn_on service. Thanks.