fixed reconnect, fixes #217

This commit is contained in:
Tomaae 2022-08-11 10:04:57 +02:00
parent b368ecc532
commit 5b1c88fa6a
No known key found for this signature in database
GPG key ID: 8360BBD8A381D1C0

View file

@ -598,12 +598,11 @@ class MikrotikControllerData:
except Exception:
return
await self.hass.async_add_executor_job(self.get_system_resource)
if self.api.connected() and "available" not in self.data["fw-update"]:
await self.async_fwupdate_check()
if self.api.connected():
await self.hass.async_add_executor_job(self.get_system_resource)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_system_health)