Add horizontal swing support to ClimateEntity (#34649)

This commit is contained in:
G Johansson 2024-11-27 15:27:46 +01:00 committed by GitHub
parent addc04110d
commit ac043879af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,7 +33,7 @@ An HVAC entity can have the following states, depending on the specific climate
### Climate control actions ### Climate control actions
Available actions: `climate.set_aux_heat`, `climate.set_preset_mode`, `climate.set_temperature`, `climate.set_humidity`, `climate.set_fan_mode`, `climate.set_hvac_mode`, `climate.set_swing_mode`, `climate.turn_on`, `climate.turn_off`, `climate.toggle` Available actions: `climate.set_aux_heat`, `climate.set_preset_mode`, `climate.set_temperature`, `climate.set_humidity`, `climate.set_fan_mode`, `climate.set_hvac_mode`, `climate.set_swing_mode`, `climate.set_swing_horizontal_mode`, `climate.turn_on`, `climate.turn_off`, `climate.toggle`
{% tip %} {% tip %}
Not all climate {% term actions %} may be available for your platform. You can check which climate action are available under **Developer Tools** -> **Actions**. Not all climate {% term actions %} may be available for your platform. You can check which climate action are available under **Developer Tools** -> **Actions**.
@ -230,6 +230,30 @@ automation:
swing_mode: 1 swing_mode: 1
``` ```
### Action `climate.set_swing_horizontal_mode`
Set horizontal swing operation mode for climate device
| Data attribute | Optional | Description |
| ----------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `entity_id` | yes | String or list of strings that define the entity ID(s) of climate device(s) to control. To target all climate devices, use `all`. |
| `swing_horizontal_mode` | no | New value of horizontal swing mode. |
#### Automation example
```yaml
automation:
trigger:
platform: time
at: "07:15:00"
action:
- action: climate.set_swing_horizontal_mode
target:
entity_id: climate.kitchen
data:
swing_horizontal_mode: on
```
### Action `climate.turn_on` ### Action `climate.turn_on`
Turn climate device on. This is only supported if the climate device supports being turned off. Turn climate device on. This is only supported if the climate device supports being turned off.