Can anyone please help explain why this automation doesn’t work if use a template to lookup the entity_id
- alias: "Socket Timer Started"
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.socket_timer
action:
service: switch.turn_on
target:
entity_id: "{{ states('input_select.power_sockets') }}"
but this version where I do the same thing using a variable does work
alias: "Socket Timer Started"
trigger:
- platform: event
event_type: timer.started
event_data:
entity_id: timer.socket_timer
variables:
target_entity: >-
{{ states("input_select.power_sockets") }}
action:
service: switch.turn_on
target:
entity_id: "{{target_entity}}"