mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-30 12:46:51 +00:00
Added 'availability_template' to all Template Fan platform (#10312)
* Added 'availability_template' to all Template Fan platform * Fixed Syntax and default * Removed optional parameter from example config * Apply suggestions from code review Co-Authored-By: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
c752427e1b
commit
acb0557228
@ -17,6 +17,7 @@ To enable Template Fans in your installation, add the following to your
|
|||||||
`configuration.yaml` file:
|
`configuration.yaml` file:
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
fan:
|
fan:
|
||||||
@ -49,6 +50,7 @@ fan:
|
|||||||
- '2'
|
- '2'
|
||||||
- '3'
|
- '3'
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
@ -77,6 +79,11 @@ fan:
|
|||||||
description: "Defines a template to get the direction of the fan. Valid value: 'forward'/'reverse'"
|
description: "Defines a template to get the direction of the fan. Valid value: 'forward'/'reverse'"
|
||||||
required: false
|
required: false
|
||||||
type: template
|
type: template
|
||||||
|
availability_template:
|
||||||
|
description: Defines a template to get the `available` state of the component. If the template returns `true`, the device is `available`. If the template returns any other value, the device will be `unavailable`. If `availability_template` is not configured, the component will always be `available`.
|
||||||
|
required: false
|
||||||
|
type: template
|
||||||
|
default: true
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user