File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
homeassistant/components/ephember Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 33from __future__ import annotations
44
55from datetime import timedelta
6+ from enum import IntEnum
67import logging
78from typing import Any
89
910from pyephember2 .pyephember2 import (
1011 EphEmber ,
1112 ZoneMode ,
13+ boiler_state ,
1214 zone_current_temperature ,
13- zone_is_active ,
1415 zone_is_hotwater ,
1516 zone_mode ,
1617 zone_name ,
5354 "OFF" : HVACMode .OFF ,
5455}
5556
57+
58+ class EPHBoilerStates (IntEnum ):
59+ """Boiler states for a zone given by the api."""
60+
61+ FIXME = 0
62+ OFF = 1
63+ ON = 2
64+
65+
5666HA_STATE_TO_EPH = {value : key for key , value in EPH_TO_HA_STATE .items ()}
5767
5868
@@ -123,7 +133,7 @@ def target_temperature(self) -> float | None:
123133 @property
124134 def hvac_action (self ) -> HVACAction :
125135 """Return current HVAC action."""
126- if zone_is_active (self ._zone ):
136+ if boiler_state (self ._zone ) == EPHBoilerStates . ON :
127137 return HVACAction .HEATING
128138
129139 return HVACAction .IDLE
You can’t perform that action at this time.
0 commit comments