diff --git a/homeassistant/components/melcloud/climate.py b/homeassistant/components/melcloud/climate.py index b7952077223..e2d1fdd984d 100644 --- a/homeassistant/components/melcloud/climate.py +++ b/homeassistant/components/melcloud/climate.py @@ -24,6 +24,7 @@ from homeassistant.components.climate.const import ( HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF, SUPPORT_FAN_MODE, + SUPPORT_SWING_MODE, SUPPORT_TARGET_TEMPERATURE, ) from homeassistant.config_entries import ConfigEntry @@ -246,10 +247,24 @@ class AtaDeviceClimate(MelCloudClimate): ) await self._device.set({ata.PROPERTY_VANE_VERTICAL: position}) + @property + def swing_mode(self) -> Optional[str]: + """Return vertical vane position or mode.""" + return self._device.vane_vertical + + async def async_set_swing_mode(self, swing_mode) -> None: + """Set vertical vane position or mode.""" + await self.async_set_vane_vertical(swing_mode) + + @property + def swing_modes(self) -> Optional[str]: + """Return a list of available vertical vane positions and modes.""" + return self._device.vane_vertical_positions + @property def supported_features(self) -> int: """Return the list of supported features.""" - return SUPPORT_FAN_MODE | SUPPORT_TARGET_TEMPERATURE + return SUPPORT_FAN_MODE | SUPPORT_TARGET_TEMPERATURE | SUPPORT_SWING_MODE async def async_turn_on(self) -> None: """Turn the entity on."""