From 3dae4c465bdf1f32dc19bbf7b87da3b13f2ed037 Mon Sep 17 00:00:00 2001 From: tpacri Date: Sat, 11 Jan 2025 10:55:39 +0200 Subject: [PATCH] Fix current state in climate.py --- .../multizone_generic_thermostat/climate.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/custom_components/multizone_generic_thermostat/climate.py b/custom_components/multizone_generic_thermostat/climate.py index c5f41b1..7911675 100644 --- a/custom_components/multizone_generic_thermostat/climate.py +++ b/custom_components/multizone_generic_thermostat/climate.py @@ -872,6 +872,7 @@ def current_temperature(self): @property def hvac_mode(self): """Return current operation.""" + #_LOGGER.warning("hvac_mode %s", self._hvac_mode) return self._hvac_mode @property @@ -881,12 +882,16 @@ def hvac_action(self): Need to be one of CURRENT_HVAC_*. """ if self._hvac_mode == HVACMode.OFF: + #_LOGGER.warning("hvac_action HVACAction.OFF") return HVACAction.OFF if not self._is_device_active: + #_LOGGER.warning("hvac_action HVACAction.IDLE") return HVACAction.IDLE if self.ac_mode: - return HVACAction.COOL - return HVACAction.HEAT + #_LOGGER.warning("hvac_action HVACAction.COOL") + return HVACAction.COOLING + #_LOGGER.warning("hvac_action HVACAction.HEATING") + return HVACAction.HEATING @property def target_temperature(self): @@ -897,6 +902,7 @@ def target_temperature(self): @property def hvac_modes(self): """List of available operation modes.""" + #_LOGGER.warning("hvac_modes %s", ", ".join(self._hvac_list)) return self._hvac_list @property @@ -914,6 +920,7 @@ def preset_modes(self): async def async_set_hvac_mode(self, hvac_mode): """Set hvac mode.""" + #_LOGGER.warning("async_set_hvac_mode %s", hvac_mode) if hvac_mode == HVACMode.HEAT: self._hvac_mode = HVACMode.HEAT await self._async_control_heating(force=True)