Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions source/_components/input_select.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,39 @@ Configuration variables:

Pick an icon that you can find on [materialdesignicons.com](https://materialdesignicons.com/) to use for your input and prefix the name with `mdi:`. For example `mdi:car`, `mdi:ambulance`, or `mdi:motorbike`.

### {% linkable_title Services %}

This components provide three services to modify the state of the `input_select`:

- `input_select.select_option`: This can be used to select a specific option. The option is passed as `option` attribute in the service data.
- `input_select.select_previous`: Select the previous option.
- `input_select.select_next`: Select the next option.

The following example shows the usage of the `input_select.select_option` service in an automation:

```yaml
# Example configuration.yaml entry
automation:
- alias: example automation
trigger:
platform: event
event_type: MY_CUSTOM_EVENT
action:
- service: input_select.select_option
data:
entity_id: input_select.who_cooks
option: Paulus
```

### {% linkable_title Scenes %}

To specify a target option in a [Scene](/components/scene/) you have to specify the target as `option` attribute:

```yaml
# Example configuration.yaml entry
scene:
- name: Example1
entities:
input_select.who_cooks:
option: Paulus
```