Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion homeassistant/components/melcloud/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
HVAC_MODE_HEAT_COOL,
HVAC_MODE_OFF,
SUPPORT_FAN_MODE,
SUPPORT_SWING_MODE,
SUPPORT_TARGET_TEMPERATURE,
)
from homeassistant.config_entries import ConfigEntry
Expand Down Expand Up @@ -246,10 +247,24 @@ async def async_set_vane_vertical(self, position: str) -> None:
)
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."""
Expand Down