I would like to have an input_select with the states of some sensors. In my case these sensors show the name of a certain file. I don’t think it’s possible with templating, but is there a workaround or maybe a custom component?
Just figured out the automations override the set options. But I don’t think the template works, because the options show {{ states('sensor.name_file_1') }} instead of the file name. Was this my last option or is it still possible to show the correct file name as an option in another workaround?
Remove the quotes from around the templates and try again.
action:
- service: input_select.set_options
data_template:
entity_id: input_select.files ### or whatever you called it (not shown in your example)
options: >
[{{ states('sensor.name_file_1') }}, {{ states('sensor.name_file_2') }}]