Add home/not_home icons to Asuswrt trackers (#58883)

* add home/not_home icons to Asuswrt trackers

like the Nmap trackers have their icons set in 2df13d0118/homeassistant/components/nmap_tracker/device_tracker.py (L186)

* white space
This commit is contained in:
Marius 2021-11-02 17:29:28 +01:00 committed by GitHub
parent 8d910c5079
commit 9307cbf861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,6 +84,11 @@ class AsusWrtDevice(ScannerEntity):
"""Return the hostname of device."""
return self._device.name
@property
def icon(self) -> str:
"""Return device icon."""
return "mdi:lan-connect" if self._device.is_connected else "mdi:lan-disconnect"
@property
def ip_address(self) -> str:
"""Return the primary ip address of the device."""