Fix for static ARP entries that aren't present in DHCP, could use a check on that.

Multiple fixes for accounting calculation and availability check.
This commit is contained in:
Ivan Pavlina 2020-04-08 15:44:28 +02:00
parent b8d311978b
commit 6978652cce
2 changed files with 32 additions and 47 deletions

View file

@ -383,7 +383,7 @@ class MikrotikAccountingSensor(MikrotikControllerSensor):
"""Return if controller and accounting feature in Mikrotik is available.
Additional check for lan-tx/rx sensors
"""
if self._attr in ['lan-tx, lan-rx']:
if self._attr in ['lan-tx', 'lan-rx']:
return self._ctrl.connected() and self._data['available'] and self._data['local_accounting']
else:
return self._ctrl.connected() and self._data['available']