mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Fix hvac_mode property to handle missing CORE_ON_OFF state in Atlantic Electrical Heater in Overkiz (#143330)
This commit is contained in:
parent
753c07e911
commit
3fc34244ac
@ -58,9 +58,12 @@ class AtlanticElectricalHeater(OverkizEntity, ClimateEntity):
|
|||||||
@property
|
@property
|
||||||
def hvac_mode(self) -> HVACMode:
|
def hvac_mode(self) -> HVACMode:
|
||||||
"""Return hvac operation ie. heat, cool mode."""
|
"""Return hvac operation ie. heat, cool mode."""
|
||||||
return OVERKIZ_TO_HVAC_MODES[
|
if OverkizState.CORE_ON_OFF in self.device.states:
|
||||||
cast(str, self.executor.select_state(OverkizState.CORE_ON_OFF))
|
return OVERKIZ_TO_HVAC_MODES[
|
||||||
]
|
cast(str, self.executor.select_state(OverkizState.CORE_ON_OFF))
|
||||||
|
]
|
||||||
|
|
||||||
|
return HVACMode.OFF
|
||||||
|
|
||||||
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
async def async_set_hvac_mode(self, hvac_mode: HVACMode) -> None:
|
||||||
"""Set new target hvac mode."""
|
"""Set new target hvac mode."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user