correctly report all entities as unavailable in UI when mikrotik is offline

This commit is contained in:
tomaae 2019-12-08 22:42:54 +01:00
parent 270c7f8274
commit 06727236da
3 changed files with 7 additions and 7 deletions

View file

@ -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):