mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-06-24 01:38:49 +02:00
correctly report all entities as unavailable in UI when mikrotik is offline
This commit is contained in:
parent
270c7f8274
commit
06727236da
3 changed files with 7 additions and 7 deletions
|
@ -112,9 +112,9 @@ class MikrotikControllerBinarySensor(BinarySensorDevice):
|
|||
return "{}-{}".format(self._inst.lower(), self._sensor.lower())
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
"""Return True if entity is available."""
|
||||
return bool(self._ctrl.data)
|
||||
def available(self) -> bool:
|
||||
"""Return if controller is available."""
|
||||
return self._ctrl.connected()
|
||||
|
||||
@property
|
||||
def device_info(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue