From 2fc8544a34b052fa8f1018ee798dbb031d726efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 3 Jan 2021 13:34:55 +0000 Subject: [PATCH] Check value and not just presense of TIMECLOCK and THERMOSTAT attributes. --- neohubapi/neohub.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neohubapi/neohub.py b/neohubapi/neohub.py index 3119ce7..2bb212b 100644 --- a/neohubapi/neohub.py +++ b/neohubapi/neohub.py @@ -334,8 +334,8 @@ class NeoHub: devices = hub_data.devices delattr(hub_data, "devices") - thermostat_list = list(filter(lambda device: hasattr(device, 'THERMOSTAT'), devices)) - timeclock_list = list(filter(lambda device: hasattr(device, 'TIMECLOCK'), devices)) + thermostat_list = list(filter(lambda device: hasattr(device, 'THERMOSTAT') and device.THERMOSTAT, devices)) + timeclock_list = list(filter(lambda device: hasattr(device, 'TIMECLOCK') and device.TIMECLOCK, devices)) thermostats = [] timeclocks = []