Add documentation for set_options service call (#3292)

* Add documentation for set_options service call

* Minor changes
This commit is contained in:
Reza Moallemi 2017-09-02 15:21:53 +04:30 committed by Fabian Affolter
parent 3d26a4f893
commit 2112525d2a

View File

@ -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: