From 81c2e356ecdf4da3130911f50d5bf7b2f26f002b Mon Sep 17 00:00:00 2001 From: Christian McHugh Date: Sat, 27 Sep 2025 19:19:57 +0100 Subject: [PATCH] Fix: Set EPH climate heating as on only when boiler is actively heating (#152914) --- homeassistant/components/ephember/climate.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/ephember/climate.py b/homeassistant/components/ephember/climate.py index 8e72457f4a7..85b21da1dd5 100644 --- a/homeassistant/components/ephember/climate.py +++ b/homeassistant/components/ephember/climate.py @@ -3,14 +3,15 @@ from __future__ import annotations from datetime import timedelta +from enum import IntEnum import logging from typing import Any from pyephember2.pyephember2 import ( EphEmber, ZoneMode, + boiler_state, zone_current_temperature, - zone_is_active, zone_is_hotwater, zone_mode, zone_name, @@ -53,6 +54,15 @@ EPH_TO_HA_STATE = { "OFF": HVACMode.OFF, } + +class EPHBoilerStates(IntEnum): + """Boiler states for a zone given by the api.""" + + FIXME = 0 + OFF = 1 + ON = 2 + + HA_STATE_TO_EPH = {value: key for key, value in EPH_TO_HA_STATE.items()} @@ -123,7 +133,7 @@ class EphEmberThermostat(ClimateEntity): @property def hvac_action(self) -> HVACAction: """Return current HVAC action.""" - if zone_is_active(self._zone): + if boiler_state(self._zone) == EPHBoilerStates.ON: return HVACAction.HEATING return HVACAction.IDLE