I am using the Unifi Network integration, and I have one device (my car charger), that sometimes becomes unresponsive in Home Assistant (probably because it’s on the other side of a brick wall).
I’ve noticed that if I go into the Unifi App, choose the device (car charger), and force a “reconnect”, that usually fixes this immediately.
Is there a way to do this from Home Assistant? I.e., whenever that device is unavailable, automatically ask Unifi to reconnect it?
If you use the GUI the device ID is auto populated from the friendly name. In your instance you’d trigger it when the state of the charger goes to “unavailable”.
How would I go about creating a script that reconnected a device whenever Home Assistant detected it was offline / unavailable?
I confirmed the unifi.reconnect_client works for the device, but I am unfamiliar how to indicate that when an entity belonging to that device becomes unavailable, I should call reconnect_client for that device.