Add documentation for set_options service call (#3292)
* Add documentation for set_options service call * Minor changes
This commit is contained in:
parent
3d26a4f893
commit
2112525d2a
1 changed files with 17 additions and 1 deletions
|
@ -71,6 +71,22 @@ automation:
|
|||
option: Paulus
|
||||
```
|
||||
|
||||
To dynamically set the `input_select` options you can call `input_select.set_options`. The following example can be used in an automation rule:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
automation:
|
||||
- alias: example automation
|
||||
trigger:
|
||||
platform: event
|
||||
event_type: MY_CUSTOM_EVENT
|
||||
action:
|
||||
- service: input_select.set_options
|
||||
data:
|
||||
entity_id: input_select.who_cooks
|
||||
options: ["Item A", "Item B", "Item C"]
|
||||
```
|
||||
|
||||
### {% linkable_title Scenes %}
|
||||
|
||||
To specify a target option in a [Scene](/components/scene/) you have to specify the target as `option` attribute:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue