I’m trying to include the value of a selector in my action, but I can’t seem to get it to parse properly. The following works fine in developer tools
> template
sandbox:
"{{ states('select.dishwasher_selected_program') }}"
However including it in my automation, it doesn’t get parsed and errors out with Option {{ states('select.dishwasher_selected_program') }} is not valid for entity select.dishwasher_active_program, valid options are:...
Automation YAML (see 2nd line from bottom):
alias: Dishwasher - Handle "Run Now" Pressed
description: ""
triggers:
- entity_id:
- input_button.dishwasher_run_now
trigger: state
conditions: []
actions:
- device_id: f618f7a21647c5208227d3a01213c3c0
domain: select
entity_id: eceaf7ea812fb1aba958d556d3699845
type: select_option
option: "{{ states('select.dishwasher_selected_program') }}"
mode: single
What’s the proper syntax to include this in my automation so it parses and presents the current value of the selector to my script?