mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-18 17:54:36 +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
|
@property
|
||||||
def icon(self):
|
def icon(self):
|
||||||
"""Return the icon."""
|
"""Return the icon."""
|
||||||
icon = 'mdi:lan-disconnect'
|
|
||||||
if self.mikrotik_controller.data['interface'][self._uid]['running']:
|
if self.mikrotik_controller.data['interface'][self._uid]['running']:
|
||||||
icon = 'mdi:lan-connect'
|
icon = 'mdi:lan-connect'
|
||||||
else:
|
else:
|
||||||
icon = 'mdi:lan-pending'
|
icon = 'mdi:lan-pending'
|
||||||
|
|
||||||
|
if not self.mikrotik_controller.data['interface'][self._uid]['enabled']:
|
||||||
|
icon = 'mdi:lan-disconnect'
|
||||||
|
|
||||||
return icon
|
return icon
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue