Update input_select.markdown (#10795)

Adds documentation for improved scene support for input_select.
This commit is contained in:
Rolf K 2019-10-16 22:02:18 +02:00 committed by Franck Nijhof
parent 6a232dce58
commit fc22f519f4

View File

@ -77,17 +77,32 @@ This integrations provide three services to modify the state of the `input_selec
### Scenes ### Scenes
To specify a target option in a [Scene](/integrations/scene/) you have to specify the target as `option` attribute: Specifying a target option in a [Scene](/integrations/scene/) is simple:
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
scene: scene:
- name: Example1 - name: Example1
entities: entities:
input_select.who_cooks: input_select.who_cooks: Paulus
option: Paulus
``` ```
The list of options can also be set in a [Scene](/integrations/scene). In that case, you also need to specify what the new state will be.
```yaml
# Example configuration.yaml entry
scene:
- name: Example2
entities:
input_select.who_cooks:
options:
- Alice
- Bob
- Paulus
state: Bob
```
## Automation Examples ## Automation Examples
The following example shows the usage of the `input_select.select_option` service in an automation: The following example shows the usage of the `input_select.select_option` service in an automation: