Disable environment on routeros 7+ #73

This commit is contained in:
tomaae 2020-12-12 12:57:16 +01:00
parent cb01daa3a3
commit 7b137c0902

View file

@ -503,7 +503,11 @@ class MikrotikControllerData:
if self.api.connected() and self.option_sensor_simple_queues:
await self.hass.async_add_executor_job(self.get_queue)
if self.api.connected() and self.option_sensor_environment:
if (
self.api.connected()
and self.option_sensor_environment
and 0 < self.major_fw_version < 7
):
await self.hass.async_add_executor_job(self.get_environment)
async_dispatcher_send(self.hass, self.signal_update)