UniFi Integration - Sensor indicating primary and backup WAN status, including which is currently active

Is it possible for the UniFi integration to pull through the status of each of the WAN ports from a UDM-PRO (or other gateway device) to a sensor entity indicating whether they’re connected, and an attribute to show whether the interface is active.

It would be useful to have this info passed through to HA to facilitate automation of bandwidth limitations if the network has failed over to the backup WAN interface, which may have narrow bandwidth or download limits.

I have a similar use case and attempted to solve this using Uplink info, but it doesn’t seem to function the way I expected.

I think the approach I suggest here is probably the right way to do this in the future: Add Uplink info to UniFi Device tracker attributes by ViViDboarder · Pull Request #123032 · home-assistant/core · GitHub

I’ll probably get to it at some point… right now I’m using a rest sensor that pulls my public IP and detects my ISP that way.