mirror of
https://github.com/home-assistant/core.git
synced 2025-07-27 07:07:28 +00:00
Add support for HVAC mode "OFF" in Somfy Heating Temperature Interface in Overkiz (#143396)
Co-authored-by: Josef Zweck <josef@zweck.dev>
This commit is contained in:
parent
f0cf620854
commit
54050f10b7
@ -77,7 +77,7 @@ class SomfyHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
|
|||||||
| ClimateEntityFeature.TURN_OFF
|
| ClimateEntityFeature.TURN_OFF
|
||||||
| ClimateEntityFeature.TURN_ON
|
| ClimateEntityFeature.TURN_ON
|
||||||
)
|
)
|
||||||
_attr_hvac_modes = [*HVAC_MODES_TO_OVERKIZ]
|
_attr_hvac_modes = [*HVAC_MODES_TO_OVERKIZ, HVACMode.OFF]
|
||||||
_attr_preset_modes = [*PRESET_MODES_TO_OVERKIZ]
|
_attr_preset_modes = [*PRESET_MODES_TO_OVERKIZ]
|
||||||
# Both min and max temp values have been retrieved from the Somfy Application.
|
# Both min and max temp values have been retrieved from the Somfy Application.
|
||||||
_attr_min_temp = 15.0
|
_attr_min_temp = 15.0
|
||||||
@ -110,9 +110,14 @@ class SomfyHeatingTemperatureInterface(OverkizEntity, ClimateEntity):
|
|||||||
|
|
||||||
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."""
|
||||||
await self.executor.async_execute_command(
|
if hvac_mode is HVACMode.OFF:
|
||||||
OverkizCommand.SET_ACTIVE_MODE, HVAC_MODES_TO_OVERKIZ[hvac_mode]
|
await self.executor.async_execute_command(
|
||||||
)
|
OverkizCommand.SET_ON_OFF, OverkizCommandParam.OFF
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
await self.executor.async_execute_command(
|
||||||
|
OverkizCommand.SET_ACTIVE_MODE, HVAC_MODES_TO_OVERKIZ[hvac_mode]
|
||||||
|
)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def preset_mode(self) -> str | None:
|
def preset_mode(self) -> str | None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user