mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Add support for direction to fan template (#5342)
* Update docs * Add missing quotes
This commit is contained in:
parent
8f835ce456
commit
2db10cf5fe
@ -14,8 +14,8 @@ logo: home-assistant.png
|
|||||||
---
|
---
|
||||||
|
|
||||||
The `template` platform creates fans that combine components and provides the
|
The `template` platform creates fans that combine components and provides the
|
||||||
ability to run scripts or invoke services for each of the turn_on, turn_off, set_speed, and
|
ability to run scripts or invoke services for each of the turn_on, turn_off, set_speed,
|
||||||
set_oscillating commands of a fan.
|
set_oscillating, and set_direction commands of a fan.
|
||||||
|
|
||||||
To enable Template Fans in your installation, add the following to your
|
To enable Template Fans in your installation, add the following to your
|
||||||
`configuration.yaml` file:
|
`configuration.yaml` file:
|
||||||
@ -31,6 +31,7 @@ fan:
|
|||||||
value_template: "{{ states('input_boolean.state') }}"
|
value_template: "{{ states('input_boolean.state') }}"
|
||||||
speed_template: "{{ states('input_select.speed') }}"
|
speed_template: "{{ states('input_select.speed') }}"
|
||||||
oscillating_template: "{{ states('input_select.osc') }}"
|
oscillating_template: "{{ states('input_select.osc') }}"
|
||||||
|
direction_template: "{{ states('input_select.direction') }}"
|
||||||
turn_on:
|
turn_on:
|
||||||
service: script.fan_on
|
service: script.fan_on
|
||||||
turn_off:
|
turn_off:
|
||||||
@ -43,6 +44,10 @@ fan:
|
|||||||
service: script.fan_oscillating
|
service: script.fan_oscillating
|
||||||
data_template:
|
data_template:
|
||||||
oscillating: "{{ oscillating }}"
|
oscillating: "{{ oscillating }}"
|
||||||
|
set_direction:
|
||||||
|
service: script.fan_direction
|
||||||
|
data_template:
|
||||||
|
direction: "{{ direction }}"
|
||||||
speeds:
|
speeds:
|
||||||
- '1'
|
- '1'
|
||||||
- '2'
|
- '2'
|
||||||
@ -72,6 +77,10 @@ fan:
|
|||||||
description: "Defines a template to get the osc state of the fan. Valid value: True/False"
|
description: "Defines a template to get the osc state of the fan. Valid value: True/False"
|
||||||
required: false
|
required: false
|
||||||
type: template
|
type: template
|
||||||
|
direction_template:
|
||||||
|
description: "Defines a template to get the direction of the fan. Valid value: 'forward'/'reverse'"
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
turn_on:
|
turn_on:
|
||||||
description: Defines an action to run when the fan is turned on.
|
description: Defines an action to run when the fan is turned on.
|
||||||
required: true
|
required: true
|
||||||
@ -88,6 +97,10 @@ fan:
|
|||||||
description: Defines an action to run when the fan is given a osc state command.
|
description: Defines an action to run when the fan is given a osc state command.
|
||||||
required: false
|
required: false
|
||||||
type: action
|
type: action
|
||||||
|
set_direction:
|
||||||
|
description: Defines an action to run when the fan is given a direction command.
|
||||||
|
required: false
|
||||||
|
type: action
|
||||||
speeds:
|
speeds:
|
||||||
description: List of speeds the fan is capable of running at.
|
description: List of speeds the fan is capable of running at.
|
||||||
required: false
|
required: false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user