From 2d038dfdbc62b3144a9be1f1883fdf5a330e0c7c Mon Sep 17 00:00:00 2001 From: Dave Code <34915602+dave-code-ruiz@users.noreply.github.com> Date: Mon, 13 Jan 2025 08:35:07 +0100 Subject: [PATCH] Trying to solves issues asev#52 asev#62 asev#63 --- custom_components/uponor/__init__.py | 4 ++-- custom_components/uponor/climate.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/custom_components/uponor/__init__.py b/custom_components/uponor/__init__.py index f6bbbab..2c124bb 100644 --- a/custom_components/uponor/__init__.py +++ b/custom_components/uponor/__init__.py @@ -190,7 +190,7 @@ def get_status(self, thermostat): var = thermostat + '_stat_battery_error' if var in self._data and self._data[var] == "1": return STATUS_ERROR_BATTERY - var = thermostat + '_stat_valve_position_err"' + var = thermostat + '_stat_valve_position_err' if var in self._data and self._data[var] == "1": return STATUS_ERROR_VALVE var = thermostat[0:3] + 'stat_general_system_alarm' @@ -291,7 +291,7 @@ def get_eco_setback(self, thermostat): def get_last_update(self): return self.next_sp_from_dt - def call_state_update(self): + async def call_state_update(self): async_dispatcher_send(self._hass, SIGNAL_UPONOR_STATE_UPDATE) # Rest diff --git a/custom_components/uponor/climate.py b/custom_components/uponor/climate.py index d476269..0815ca9 100644 --- a/custom_components/uponor/climate.py +++ b/custom_components/uponor/climate.py @@ -106,7 +106,8 @@ def preset_modes(self): @property def current_humidity(self): - return self._state_proxy.get_humidity(self._thermostat) + humidity = self._state_proxy.get_humidity(self._thermostat) + return humidity if humidity not in (None, 0) else None @property def current_temperature(self):