mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-29 20:27:00 +00:00
Added 'availability_template' to Template Vacuum platform (#10309)
* Added 'availability_template' to Template Vacuum 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
90d24a1a1e
commit
75505dbfb8
@ -15,6 +15,8 @@ return_to_base, clean_spot, locate and set_fan_speed commands of a vacuum.
|
|||||||
To enable Template Vacuums in your installation, add the following to your
|
To enable Template Vacuums in your installation, add the following to your
|
||||||
`configuration.yaml` file:
|
`configuration.yaml` file:
|
||||||
|
|
||||||
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
vacuum:
|
vacuum:
|
||||||
@ -22,9 +24,11 @@ vacuum:
|
|||||||
vacuums:
|
vacuums:
|
||||||
living_room_vacuum:
|
living_room_vacuum:
|
||||||
start:
|
start:
|
||||||
service: script.vacuum_start
|
service: script.vacuum_start
|
||||||
```
|
```
|
||||||
|
|
||||||
|
{% endraw %}
|
||||||
|
|
||||||
{% configuration %}
|
{% configuration %}
|
||||||
vacuums:
|
vacuums:
|
||||||
description: List of your vacuums.
|
description: List of your vacuums.
|
||||||
@ -47,6 +51,11 @@ vacuum:
|
|||||||
description: Defines a template to get the fan speed of the vacuum.
|
description: Defines a template to get the fan speed of the vacuum.
|
||||||
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
|
||||||
start:
|
start:
|
||||||
description: Defines an action to run when the vacuum is started.
|
description: Defines an action to run when the vacuum is started.
|
||||||
required: true
|
required: true
|
||||||
@ -117,6 +126,7 @@ vacuum:
|
|||||||
This example shows how to use templates to specify the state of the vacuum.
|
This example shows how to use templates to specify the state of the vacuum.
|
||||||
|
|
||||||
{% raw %}
|
{% raw %}
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
vacuum:
|
vacuum:
|
||||||
- platform: template
|
- platform: template
|
||||||
@ -144,4 +154,5 @@ vacuum:
|
|||||||
- Medium
|
- Medium
|
||||||
- High
|
- High
|
||||||
```
|
```
|
||||||
|
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user