mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-10 10:56:49 +00:00
Add label selector (#32129)
Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
16377da3b6
commit
d1d22f346d
@ -35,6 +35,7 @@ The following selectors are currently available:
|
|||||||
- [Entity selector](#entity-selector)
|
- [Entity selector](#entity-selector)
|
||||||
- [Floor selector](#floor-selector)
|
- [Floor selector](#floor-selector)
|
||||||
- [Icon selector](#icon-selector)
|
- [Icon selector](#icon-selector)
|
||||||
|
- [Label selector](#label-selector)
|
||||||
- [Language selector](#language-selector)
|
- [Language selector](#language-selector)
|
||||||
- [Location selector](#location-selector)
|
- [Location selector](#location-selector)
|
||||||
- [Media selector](#media-selector)
|
- [Media selector](#media-selector)
|
||||||
@ -886,6 +887,43 @@ placeholder:
|
|||||||
The output of this selector is a string containing the selected icon,
|
The output of this selector is a string containing the selected icon,
|
||||||
for example: `mdi:bell`.
|
for example: `mdi:bell`.
|
||||||
|
|
||||||
|
## Label selector
|
||||||
|
|
||||||
|
The label selector shows a label finder that can pick labels. The value of the
|
||||||
|
input is the label ID. If `multiple` is set to `true`, the value is a list
|
||||||
|
of label IDs.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
In its most basic form, this selector doesn't require any options.
|
||||||
|
It will show all labels.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
label:
|
||||||
|
```
|
||||||
|
|
||||||
|
{% configuration text %}
|
||||||
|
multiple:
|
||||||
|
description: >
|
||||||
|
Allows selecting multiple labels. If set to `true`, the resulting value of
|
||||||
|
this selector will be a list instead of a single string value.
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
required: false
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
The output of this selector is the label ID, or (in case `multiple` is set to
|
||||||
|
`true`) a list of label IDs.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
# Example label selector output result, when multiple is set to false
|
||||||
|
energy_saving
|
||||||
|
|
||||||
|
# Example label selector output result, when multiple is set to true
|
||||||
|
- energy_saving
|
||||||
|
- christmas_decorations
|
||||||
|
```
|
||||||
|
|
||||||
## Language selector
|
## Language selector
|
||||||
|
|
||||||
The language selector allows a user to pick a language from a list of languages.
|
The language selector allows a user to pick a language from a list of languages.
|
||||||
|
BIN
source/images/blueprints/selector-label.png
Normal file
BIN
source/images/blueprints/selector-label.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 25 KiB |
Loading…
x
Reference in New Issue
Block a user