mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Support melcloud swing mode (#33008)
* melcloud, support for swing mode * Update homeassistant/components/melcloud/climate.py Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi> * Update homeassistant/components/melcloud/climate.py Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi> * Update homeassistant/components/melcloud/climate.py Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi> * Update homeassistant/components/melcloud/climate.py Co-Authored-By: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi> Co-authored-by: Vilppu Vuorinen <vilppu.vuorinen@jubic.fi>
This commit is contained in:
parent
4a9f4f585d
commit
05192b7164
@ -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."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user