diff --git a/custom_components/myhome/climate.py b/custom_components/myhome/climate.py index c5a4839..aa0e383 100644 --- a/custom_components/myhome/climate.py +++ b/custom_components/myhome/climate.py @@ -417,19 +417,20 @@ def handle_event(self, message: OWNHeatingEvent): self._gateway_handler.log_id, message.human_readable_log, ) - if message.is_active(): - if self._heating and self._cooling: - if message.is_heating(): + if message.where != "0": + if message.is_active(): + if self._heating and self._cooling: + if message.is_heating() or self._attr_hvac_mode == HVACMode.HEAT: + self._attr_hvac_action = HVACAction.HEATING + elif message.is_cooling() or self._attr_hvac_mode == HVACMode.COOL: + self._attr_hvac_action = HVACAction.COOLING + elif self._heating or self._attr_hvac_mode == HVACMode.HEAT: self._attr_hvac_action = HVACAction.HEATING - elif message.is_cooling(): + elif self._cooling or self._attr_hvac_mode == HVACMode.COOL: self._attr_hvac_action = HVACAction.COOLING - elif self._heating: - self._attr_hvac_action = HVACAction.HEATING - elif self._cooling: - self._attr_hvac_action = HVACAction.COOLING - elif self._attr_hvac_mode == HVACMode.OFF: - self._attr_hvac_action = HVACAction.OFF - else: - self._attr_hvac_action = HVACAction.IDLE + elif self._attr_hvac_mode == HVACMode.OFF: + self._attr_hvac_action = HVACAction.OFF + else: + self._attr_hvac_action = HVACAction.IDLE self.async_schedule_update_ha_state() diff --git a/custom_components/myhome/gateway.py b/custom_components/myhome/gateway.py index 821a20d..2d6bc4f 100644 --- a/custom_components/myhome/gateway.py +++ b/custom_components/myhome/gateway.py @@ -281,6 +281,9 @@ async def listening_loop(self): ) ): self.hass.data[DOMAIN][self.mac][CONF_PLATFORMS][_platform][message.entity][CONF_ENTITIES][_entity].handle_event(message) + if isinstance(message, OWNHeatingEvent) and message.dimension == 20: + self.hass.data[DOMAIN][self.mac][CONF_PLATFORMS][CLIMATE][message.entity][CONF_ENTITIES][_entity].handle_event(message) + self.hass.data[DOMAIN][self.mac][CONF_PLATFORMS][CLIMATE][message.entity][CONF_ENTITIES][_entity].async_schedule_update_ha_state() else: LOGGER.debug(