Currently the Unifi API Host public ip item (unifi.api.host.publicip) grabs the ip from the following json path $..ip.first(). However I have found in testing, when using a DMP with two WAN interfaces, its grabbing the ip from the WAN2 interface which isn't the current default route of the DMP.
To fix this, you should be getting the ip value from the json path $..ipAddress.first(). This will allow for the value to update in the event of a failover event.
Currently the Unifi API Host public ip item (unifi.api.host.publicip) grabs the ip from the following json path
$..ip.first(). However I have found in testing, when using a DMP with two WAN interfaces, its grabbing the ip from the WAN2 interface which isn't the current default route of the DMP.To fix this, you should be getting the ip value from the json path
$..ipAddress.first(). This will allow for the value to update in the event of a failover event.