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

@ -145,7 +145,7 @@ class MikrotikControllerPortDeviceTracker(ScannerEntity):
return "{}-{}".format(self._inst.lower(), self._data['port-mac-address'])
@property
def available(self):
def available(self) -> bool:
"""Return if controller is available."""
return self._ctrl.connected()