Add state selector (#23815)

This commit is contained in:
Franck Nijhof 2022-08-21 19:00:53 +02:00 committed by GitHub
parent 422dec2045
commit 433d9148cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -33,6 +33,7 @@ The following selectors are currently available:
- [Object selector](#object-selector)
- [RGB color selector](#rgb-color-selector)
- [Select selector](#select-selector)
- [State selector](#state-selector)
- [Target selector](#target-selector)
- [Template selector](#template-selector)
- [Text selector](#text-selector)
@ -820,6 +821,29 @@ When `multiple` is `true`, the output of this selector is the list of selected
option values. In this case, if `Green` was selected, in the first example it
would return ["Green"] and in the last example it returns ["g"].
## State selector
The state selector shows a list of states for a provided entity of which
one can be selected.
![Screenshot of an state selector](/images/blueprints/selector-state.png)
{% configuration state %}
entity_id:
description: The entity ID of which an state can be selected from.
type: string
required: true
attribute:
description: The attribute of which an attribute state can be selected from.
type: string
required: false
{% endconfiguration %}
The output of this selector is the select state (not the translated or
prettified name shown in the frontend).
For example: `heat_cool`.
## Target selector
The target selector is a rather special selector, allowing the user to select

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB