mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-16 12:24:30 +02:00
fixed device tracker disabled icon
This commit is contained in:
parent
0a45a072e8
commit
a4c4b344b7
1 changed files with 3 additions and 1 deletions
|
@ -141,12 +141,14 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
|
|||
@property
|
||||
def icon(self):
|
||||
"""Return the icon."""
|
||||
icon = 'mdi:lan-disconnect'
|
||||
if self.mikrotik_controller.data['interface'][self._uid]['running']:
|
||||
icon = 'mdi:lan-connect'
|
||||
else:
|
||||
icon = 'mdi:lan-pending'
|
||||
|
||||
if not self.mikrotik_controller.data['interface'][self._uid]['enabled']:
|
||||
icon = 'mdi:lan-disconnect'
|
||||
|
||||
return icon
|
||||
|
||||
@property
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue