mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Add support for turning on swing mode in tado (#34404)
This commit is contained in:
parent
a6b407d706
commit
7a8d1c00a4
@ -39,6 +39,7 @@ from .const import (
|
|||||||
TADO_HVAC_ACTION_TO_HA_HVAC_ACTION,
|
TADO_HVAC_ACTION_TO_HA_HVAC_ACTION,
|
||||||
TADO_MODES_WITH_NO_TEMP_SETTING,
|
TADO_MODES_WITH_NO_TEMP_SETTING,
|
||||||
TADO_SWING_OFF,
|
TADO_SWING_OFF,
|
||||||
|
TADO_SWING_ON,
|
||||||
TADO_TO_HA_FAN_MODE_MAP,
|
TADO_TO_HA_FAN_MODE_MAP,
|
||||||
TADO_TO_HA_HVAC_MODE_MAP,
|
TADO_TO_HA_HVAC_MODE_MAP,
|
||||||
TYPE_AIR_CONDITIONING,
|
TYPE_AIR_CONDITIONING,
|
||||||
@ -398,10 +399,7 @@ class TadoClimate(TadoZoneEntity, ClimateDevice):
|
|||||||
def swing_modes(self):
|
def swing_modes(self):
|
||||||
"""Swing modes for the device."""
|
"""Swing modes for the device."""
|
||||||
if self._support_flags & SUPPORT_SWING_MODE:
|
if self._support_flags & SUPPORT_SWING_MODE:
|
||||||
# Currently we only support off.
|
return [TADO_SWING_ON, TADO_SWING_OFF]
|
||||||
# On will be added in the future in an update
|
|
||||||
# to PyTado
|
|
||||||
return [TADO_SWING_OFF]
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def set_swing_mode(self, swing_mode):
|
def set_swing_mode(self, swing_mode):
|
||||||
@ -415,6 +413,7 @@ class TadoClimate(TadoZoneEntity, ClimateDevice):
|
|||||||
self._current_tado_fan_speed = self._tado_zone_data.current_fan_speed
|
self._current_tado_fan_speed = self._tado_zone_data.current_fan_speed
|
||||||
self._current_tado_hvac_mode = self._tado_zone_data.current_hvac_mode
|
self._current_tado_hvac_mode = self._tado_zone_data.current_hvac_mode
|
||||||
self._current_tado_hvac_action = self._tado_zone_data.current_hvac_action
|
self._current_tado_hvac_action = self._tado_zone_data.current_hvac_action
|
||||||
|
self._current_tado_swing_mode = self._tado_zone_data.current_swing_mode
|
||||||
|
|
||||||
@callback
|
@callback
|
||||||
def _async_update_callback(self):
|
def _async_update_callback(self):
|
||||||
|
@ -79,6 +79,7 @@ async def test_smartac_with_swing(hass):
|
|||||||
"min_temp": 16.0,
|
"min_temp": 16.0,
|
||||||
"preset_mode": "home",
|
"preset_mode": "home",
|
||||||
"preset_modes": ["away", "home"],
|
"preset_modes": ["away", "home"],
|
||||||
|
"swing_modes": ["ON", "OFF"],
|
||||||
"supported_features": 57,
|
"supported_features": 57,
|
||||||
"target_temp_step": 1.0,
|
"target_temp_step": 1.0,
|
||||||
"temperature": 20.0,
|
"temperature": 20.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user