Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions pyhilo/device/graphql_value_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Loading