I want to set a scene dependent from a dropdown.
When the list value is only one word Aus or Fernsehen it activates the scene Aus bzw. Fernsehen.
But, when there is a space Licht Aus or underscore Licht_Maximal. I do not get it to work.
How the {{trigger.to_state.state}}
must be formatted?
Automation
trigger:
- platform: state
entity_id:
- input_select.scenes_bedroom
condition: []
action:
- service: scene.turn_on
data_template:
entity_id: scene.{{trigger.to_state.state}}
mode: single
Dropdown:
input_select:
scenes_bedroom:
name: Bedroom Lights
options:
- Aus
- Nachtlicht
- Fernsehen
- Maximal
initial: Aus
Scenes:
- id: '1637152617811'
name: Aus
entities:
...
Thank you
Christian