Skip to content

Commit

Permalink
🐛 Support turn_on/off method
Browse files Browse the repository at this point in the history
  • Loading branch information
kamaradclimber committed Feb 10, 2024
1 parent 166b6f9 commit 0ac5769
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion custom_components/aquarea/climate.py
Expand Up @@ -125,7 +125,8 @@ def __init__(
self._attr_unique_id = f"{config_entry.entry_id}-{self.zone_id}"

self._attr_temperature_unit = "°C"
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE
self._enable_turn_on_off_backwards_compatibility = False
self._attr_supported_features = ClimateEntityFeature.TARGET_TEMPERATURE | ClimateEntityFeature.TURN_OFF | ClimateEntityFeature.TURN_ON
self._attr_hvac_modes = [HVACMode.HEAT, HVACMode.OFF]
self._attr_hvac_mode = HVACMode.OFF

Expand All @@ -137,6 +138,12 @@ def __init__(
self._mode = ZoneTemperatureMode.DIRECT
self.change_mode(ZoneTemperatureMode.DIRECT, initialization=True)

async def async_turn_off(self) -> None:
await self.async_set_hvac_mode(HVACMode.OFF)

async def async_turn_on(self) -> None:
await self.async_set_hvac_mode(HVACMode.HEATING)

def evaluate_temperature_mode(self):
mode = self._mode
if self._sensor_mode == ZoneSensorMode.INTERNAL:
Expand Down

0 comments on commit 0ac5769

Please sign in to comment.