Skip to content
Open
Show file tree
Hide file tree
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
25 changes: 13 additions & 12 deletions custom_components/myhome/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
3 changes: 3 additions & 0 deletions custom_components/myhome/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down