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.
For some reason I struggled to get the syntax correct for the template of the device id? I’ve added this action to the script that updates all my ESPHOME devices. I have a random mDNS issue that affects some devices sometimes and this fix works whilst I try and find the mDNS issue.
Do you happen to have a Chargepoint Flex Charger? I’m having the same issue, complete with the reconnect rigamarole. I did notice that this thing seems to have flaky 5 GHz network performance, so I’m forcing it over to a 2 GHz network, despite it being about 3-4 meters from the AP.