Merge of nested IF-IF cases - K-N (#48370)
This commit is contained in:
parent
9737480742
commit
86212db71d
12 changed files with 86 additions and 65 deletions
|
@ -276,9 +276,8 @@ class MikrotikData:
|
|||
|
||||
def update(self):
|
||||
"""Update device_tracker from Mikrotik API."""
|
||||
if not self.available or not self.api:
|
||||
if not self.connect_to_hub():
|
||||
return
|
||||
if (not self.available or not self.api) and not self.connect_to_hub():
|
||||
return
|
||||
_LOGGER.debug("updating network devices for host: %s", self._host)
|
||||
self.update_devices()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue