Moved system health query to regular loop #81

This commit is contained in:
tomaae 2020-12-28 12:46:43 +01:00
parent 142a023d24
commit e8c2c4bd1e

View file

@ -404,9 +404,6 @@ class MikrotikControllerData:
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)
if self.api.connected() and self.option_sensor_scripts:
await self.hass.async_add_executor_job(self.get_script)
@ -571,6 +568,9 @@ class MikrotikControllerData:
if self.api.connected() and self.option_sensor_environment:
await self.hass.async_add_executor_job(self.get_environment)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_system_health)
async_dispatcher_send(self.hass, self.signal_update)
self.lock.release()