From 6d09f908eeeb32a943a5890859e767a7589d7711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Arnauts?= Date: Wed, 17 Jul 2024 09:13:29 +0200 Subject: [PATCH] Fix unholding sensors that don't have a value (#37) --- aiocomfoconnect/comfoconnect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aiocomfoconnect/comfoconnect.py b/aiocomfoconnect/comfoconnect.py index 74ce8e2..f81f7d0 100644 --- a/aiocomfoconnect/comfoconnect.py +++ b/aiocomfoconnect/comfoconnect.py @@ -67,8 +67,8 @@ def _unhold_sensors(self): # Emit the current cached values of the sensors, by now, they should have received a correct update. for sensor_id, _ in self._sensors.items(): - if self._sensors_values[sensor_id] is not None: - self._sensor_callback(sensor_id, self._sensors_values[sensor_id]) + if self._sensors_values.get(sensor_id) is not None: + self._sensor_callback(sensor_id, self._sensors_values.get(sensor_id)) async def connect(self, uuid: str): """Connect to the bridge."""