Hello I'm trying to figure out the right format to use a template to set input_select options from at text file thru shell_command.
my shell command is:
return_cities_list: cat /config/www/acg-tracker/options/storages/cities.list
The content of cities.list is :
- MLV
- New York City
- Paris
- Quito
- Other
- N/A
And finally, my script is:
sequence:
- action: shell_command.return_cities_list
data: {}
response_variable: cities_list
- action: input_select.set_options
metadata: {}
target:
entity_id: input_select.city
data:
options: >
- {{ cities_list['stdout'] }}
And here is THE option that got set in input_select.cities_list :
- - MLV - New York City - Paris - Quito - Other - N/A
No other option, just this one. I have spent time to try to figure the right format. I'm desperate and out ideas. Thanks for you help !