elad-bar / ha-edgeos

Integration with EdgeOS (Ubiquiti)
134 stars 23 forks source link

sensor unknown devices is now missing a label for the host details, it used to be 'leased' #153

Open EdgarBarranco opened 3 months ago

EdgarBarranco commented 3 months ago

Hi,

Something changed, maybe in the release 2.1.0. unknown devices used to have a "leased" label for the IP. I could send notifications and alerts any time a new device received an IP via DHCP that didn't have a static IP. Now the attribute has the actual IP as the label, then mac, followed by the device name. This makes state_attr not being able to parse the new device details.

This is the output of the state:

state_class: measurement
192.168.254.185: FF:FF:FF:FF:FF (ESP_FFFFF)
icon: mdi:help-network-outline
friendly_name: EDGEROUTER-X Unknown Devices
unit_of_measurement: Devices

Can a label be put back so it looks something like:

state_class: measurement
ip: 192.168.254.185 
mac: FF:FF:FF:FF:FF 
host: ESP_FFFFF
icon: mdi:help-network-outline
friendly_name: EDGEROUTER-X Unknown Devices
unit_of_measurement: Devices

so state_attr can use the extra labels to extract the new host information.

Thanks!

illuzn commented 1 month ago

Fixed in #156