Check ISY994 climate for unknown humidity on Z-Wave Thermostat (#72670)

This commit is contained in:
shbatm 2022-05-29 11:00:18 -05:00 committed by Paulus Schoutsen
parent 6f01c13845
commit 952433d16e

View file

@ -6,6 +6,7 @@ from typing import Any
from pyisy.constants import (
CMD_CLIMATE_FAN_SETTING,
CMD_CLIMATE_MODE,
ISY_VALUE_UNKNOWN,
PROP_HEAT_COOL_STATE,
PROP_HUMIDITY,
PROP_SETPOINT_COOL,
@ -116,6 +117,8 @@ class ISYThermostatEntity(ISYNodeEntity, ClimateEntity):
"""Return the current humidity."""
if not (humidity := self._node.aux_properties.get(PROP_HUMIDITY)):
return None
if humidity == ISY_VALUE_UNKNOWN:
return None
return int(humidity.value)
@property