File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ Configuration variables:
37
37
38
38
- **[alias]** array (*Required*): Alias for the input. Multiple entries are allowed..
39
39
- **name** (*Optional*): Friendly name of the input.
40
- - **options** array (*Required*): List of options to choose from.
40
+ - **options** array (*Required*): List of options to choose from.
41
41
- **initial** (*Optional*): Initial value when Home Assistant starts.
42
42
- **icon** (*Optional*): Icon for entry.
43
43
@@ -71,6 +71,22 @@ automation:
71
71
option: Paulus
72
72
` ` `
73
73
74
+ To dynamically set the `input_select` options you can call `input_select.set_options`. The following example can be used in an automation rule :
75
+
76
+ ` ` ` yaml
77
+ # Example configuration.yaml entry
78
+ automation:
79
+ - alias: example automation
80
+ trigger:
81
+ platform: event
82
+ event_type: MY_CUSTOM_EVENT
83
+ action:
84
+ - service: input_select.set_options
85
+ data:
86
+ entity_id: input_select.who_cooks
87
+ options: ["Item A", "Item B", "Item C"]
88
+ ` ` `
89
+
74
90
# ## {% linkable_title Scenes %}
75
91
76
92
To specify a target option in a [Scene](/components/scene/) you have to specify the target as `option` attribute :
You can’t perform that action at this time.
0 commit comments