mirror of
https://github.com/home-assistant/core.git
synced 2025-04-23 00:37:53 +00:00
Populate HVACAction/HVACMode for TouchlineSL zones (#131075)
This commit is contained in:
parent
7fba788f18
commit
11ef2b6da8
@ -7,6 +7,7 @@ from pytouchlinesl import Zone
|
||||
from homeassistant.components.climate import (
|
||||
ClimateEntity,
|
||||
ClimateEntityFeature,
|
||||
HVACAction,
|
||||
HVACMode,
|
||||
)
|
||||
from homeassistant.const import ATTR_TEMPERATURE, UnitOfTemperature
|
||||
@ -41,6 +42,7 @@ class TouchlineSLZone(CoordinatorEntity[TouchlineSLModuleCoordinator], ClimateEn
|
||||
"""Roth Touchline SL Zone."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
_attr_hvac_action = HVACAction.IDLE
|
||||
_attr_hvac_mode = HVACMode.HEAT
|
||||
_attr_hvac_modes = [HVACMode.HEAT]
|
||||
_attr_name = None
|
||||
@ -124,3 +126,16 @@ class TouchlineSLZone(CoordinatorEntity[TouchlineSLModuleCoordinator], ClimateEn
|
||||
elif self.zone.mode == "globalSchedule":
|
||||
schedule = self.zone.schedule
|
||||
self._attr_preset_mode = schedule.name
|
||||
|
||||
if self.zone.algorithm == "heating":
|
||||
self._attr_hvac_action = (
|
||||
HVACAction.HEATING if self.zone.relay_on else HVACAction.IDLE
|
||||
)
|
||||
self._attr_hvac_mode = HVACMode.HEAT
|
||||
self._attr_hvac_modes = [HVACMode.HEAT]
|
||||
elif self.zone.algorithm == "cooling":
|
||||
self._attr_hvac_action = (
|
||||
HVACAction.COOLING if self.zone.relay_on else HVACAction.IDLE
|
||||
)
|
||||
self._attr_hvac_mode = HVACMode.COOL
|
||||
self._attr_hvac_modes = [HVACMode.COOL]
|
||||
|
Loading…
x
Reference in New Issue
Block a user