mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-25 02:07:15 +00:00
Update fan documentation for entity model separation of fan speeds into percentages and presets modes (#16265)
This commit is contained in:
parent
c9d0b792fe
commit
d41290fa51
@ -16,7 +16,10 @@ The Fan integration allows you to control and monitor Fan devices.
|
|||||||
### Fan control services
|
### Fan control services
|
||||||
|
|
||||||
Available services:
|
Available services:
|
||||||
`fan.set_speed`, `fan.set_direction`, `fan.oscillate`, `fan.turn_on`, `fan.turn_off`, `fan.toggle`
|
`fan.set_percentage`, `fan.set_preset_mode`, `fan.set_direction`, `fan.oscillate`, `fan.turn_on`, `fan.turn_off`, `fan.toggle`
|
||||||
|
|
||||||
|
Deprecated services:
|
||||||
|
`fan.set_speed`
|
||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
|
|
||||||
@ -24,14 +27,14 @@ Not all fan services may be available for your platform. You can check which ser
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Service `fan.set_speed`
|
### Service `fan.set_percentage`
|
||||||
|
|
||||||
Sets the speed for fan device.
|
Sets the speed percentage for fan device.
|
||||||
|
|
||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
| ---------------------- | -------- | ----------- |
|
| ---------------------- | -------- | ----------- |
|
||||||
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
||||||
| `speed` | no | Speed setting
|
| `percentage` | no | Percentage speed setting
|
||||||
|
|
||||||
#### Automation example
|
#### Automation example
|
||||||
|
|
||||||
@ -41,10 +44,34 @@ automation:
|
|||||||
platform: time
|
platform: time
|
||||||
at: "07:15:00"
|
at: "07:15:00"
|
||||||
action:
|
action:
|
||||||
- service: fan.set_speed
|
- service: fan.set_percentage
|
||||||
data:
|
data:
|
||||||
entity_id: fan.kitchen
|
entity_id: fan.kitchen
|
||||||
speed: low
|
percentage: 33
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Service `fan.set_preset_mode`
|
||||||
|
|
||||||
|
Sets a preset mode for fan device.
|
||||||
|
|
||||||
|
| Service data attribute | Optional | Description |
|
||||||
|
| ---------------------- | -------- | ----------- |
|
||||||
|
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
||||||
|
| `preset_mode` | no | The preset mode
|
||||||
|
|
||||||
|
#### Automation example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
automation:
|
||||||
|
trigger:
|
||||||
|
platform: time
|
||||||
|
at: "07:15:00"
|
||||||
|
action:
|
||||||
|
- service: fan.set_preset_mode
|
||||||
|
data:
|
||||||
|
entity_id: fan.kitchen
|
||||||
|
preset_mode: auto
|
||||||
```
|
```
|
||||||
|
|
||||||
### Service `fan.set_direction`
|
### Service `fan.set_direction`
|
||||||
@ -100,6 +127,8 @@ Turn fan device on. This is only supported if the fan device supports being turn
|
|||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
| ---------------------- | -------- | ----------- |
|
| ---------------------- | -------- | ----------- |
|
||||||
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
||||||
|
| `percentage` | yes | Percentage speed setting
|
||||||
|
| `preset_mode` | yes | The preset mode
|
||||||
|
|
||||||
### Service `fan.turn_off`
|
### Service `fan.turn_off`
|
||||||
|
|
||||||
@ -108,3 +137,27 @@ Turn fan device off. This is only supported if the fan device supports being tur
|
|||||||
| Service data attribute | Optional | Description |
|
| Service data attribute | Optional | Description |
|
||||||
| ---------------------- | -------- | ----------- |
|
| ---------------------- | -------- | ----------- |
|
||||||
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
||||||
|
|
||||||
|
|
||||||
|
### Deprecated Service `fan.set_speed`
|
||||||
|
|
||||||
|
Sets the speed for fan device.
|
||||||
|
|
||||||
|
| Service data attribute | Optional | Description |
|
||||||
|
| ---------------------- | -------- | ----------- |
|
||||||
|
| `entity_id` | yes | String or list of strings that define the entity ID(s) of fan device(s) to control. To target all fan devices, use `all`.
|
||||||
|
| `speed` | no | Speed setting
|
||||||
|
|
||||||
|
#### Automation example
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
automation:
|
||||||
|
trigger:
|
||||||
|
platform: time
|
||||||
|
at: "07:15:00"
|
||||||
|
action:
|
||||||
|
- service: fan.set_speed
|
||||||
|
data:
|
||||||
|
entity_id: fan.kitchen
|
||||||
|
speed: low
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user