mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-29 04:06:54 +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
|
||||
`configuration.yaml` file:
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
vacuum:
|
||||
@ -22,9 +24,11 @@ vacuum:
|
||||
vacuums:
|
||||
living_room_vacuum:
|
||||
start:
|
||||
service: script.vacuum_start
|
||||
service: script.vacuum_start
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
||||
{% configuration %}
|
||||
vacuums:
|
||||
description: List of your vacuums.
|
||||
@ -47,6 +51,11 @@ vacuum:
|
||||
description: Defines a template to get the fan speed of the vacuum.
|
||||
required: false
|
||||
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:
|
||||
description: Defines an action to run when the vacuum is started.
|
||||
required: true
|
||||
@ -117,6 +126,7 @@ vacuum:
|
||||
This example shows how to use templates to specify the state of the vacuum.
|
||||
|
||||
{% raw %}
|
||||
|
||||
```yaml
|
||||
vacuum:
|
||||
- platform: template
|
||||
@ -144,4 +154,5 @@ vacuum:
|
||||
- Medium
|
||||
- High
|
||||
```
|
||||
|
||||
{% endraw %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user