From d6caaa2d8d6e9fcf5f8637b18b79b4866c1e6523 Mon Sep 17 00:00:00 2001 From: "Ian C." <108159253+ic-dev21@users.noreply.github.com> Date: Sat, 31 Oct 2026 14:55:07 -0400 Subject: [PATCH] =?UTF-8?q?G=C3=A9rer=20le=20humidity=20sensor=20Allia?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyhilo/device/graphql_value_mapper.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/pyhilo/device/graphql_value_mapper.py b/pyhilo/device/graphql_value_mapper.py index 5399a44..9954bbe 100644 --- a/pyhilo/device/graphql_value_mapper.py +++ b/pyhilo/device/graphql_value_mapper.py @@ -174,11 +174,14 @@ def _build_thermostat( device["hiloId"], "ZigbeeVersion", device["zigbeeVersion"] ) ) - attributes.append( - self.build_attribute( - device["hiloId"], "Humidity", device.get("ambientHumidity") or 0 + # Some models (e.g. the HT402) have no humidity sensor and always + # report 0, so only keep a real, non-zero reading. + if device.get("ambientHumidity"): + attributes.append( + self.build_attribute( + device["hiloId"], "Humidity", device["ambientHumidity"] + ) ) - ) if device.get("allowedModes") is not None: attributes.append( self.build_attribute(