diff --git a/homeassistant/components/tado/climate.py b/homeassistant/components/tado/climate.py index 7d26dbb20ee..5e1bfa94dec 100644 --- a/homeassistant/components/tado/climate.py +++ b/homeassistant/components/tado/climate.py @@ -39,6 +39,7 @@ from .const import ( TADO_HVAC_ACTION_TO_HA_HVAC_ACTION, TADO_MODES_WITH_NO_TEMP_SETTING, TADO_SWING_OFF, + TADO_SWING_ON, TADO_TO_HA_FAN_MODE_MAP, TADO_TO_HA_HVAC_MODE_MAP, TYPE_AIR_CONDITIONING, @@ -398,10 +399,7 @@ class TadoClimate(TadoZoneEntity, ClimateDevice): def swing_modes(self): """Swing modes for the device.""" if self._support_flags & SUPPORT_SWING_MODE: - # Currently we only support off. - # On will be added in the future in an update - # to PyTado - return [TADO_SWING_OFF] + return [TADO_SWING_ON, TADO_SWING_OFF] return None 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_hvac_mode = self._tado_zone_data.current_hvac_mode 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 def _async_update_callback(self): diff --git a/tests/components/tado/test_climate.py b/tests/components/tado/test_climate.py index dfb2973f4cb..05471d9060e 100644 --- a/tests/components/tado/test_climate.py +++ b/tests/components/tado/test_climate.py @@ -79,6 +79,7 @@ async def test_smartac_with_swing(hass): "min_temp": 16.0, "preset_mode": "home", "preset_modes": ["away", "home"], + "swing_modes": ["ON", "OFF"], "supported_features": 57, "target_temp_step": 1.0, "temperature": 20.0,