Skip to content
Merged
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
7 changes: 6 additions & 1 deletion custom_components/myhome/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
)

try: # OWNd > 2.0.0b10 (OpenWebNet-HA/OWNd#94)
from OWNd.message import MESSAGE_TYPE_SEASON, SEASON_HEATING
from OWNd.message import MESSAGE_TYPE_SEASON, SEASON_CONDITIONING, SEASON_HEATING
except ImportError: # pragma: no cover - pinned OWNd 2.0.0b10 reports WHAT 1/0 as hvac_mode
MESSAGE_TYPE_SEASON = "hvac_season"
SEASON_HEATING = "heating"
SEASON_CONDITIONING = "conditioning"

from .const import (
BUS_ROUTING,
Expand Down Expand Up @@ -1162,6 +1163,10 @@ def handle_event(self, message: OWNHeatingEvent) -> None:
self._attr_hvac_action = HVACAction.HEATING
elif message.is_cooling():
self._attr_hvac_action = HVACAction.COOLING
elif self._season == SEASON_HEATING:
self._attr_hvac_action = HVACAction.HEATING
elif self._season in (SEASON_CONDITIONING, "cooling"):
self._attr_hvac_action = HVACAction.COOLING
elif self._attr_hvac_mode == HVACMode.COOL:
self._attr_hvac_action = HVACAction.COOLING
elif self._attr_hvac_mode == HVACMode.HEAT:
Expand Down
Loading