Hi,
seems I’m to stupid to understand how to work with trigger.id
An example stub:
- id: 'someone_awake' ## awake
mode: queued
alias: 'People - someone - awake'
initial_state: 'on'
trigger:
- platform: state
entity_id: sensor.whatever_click
to: 'double'
id: 'person1'
- platform: state
entity_id: sensor.whatever_click2
to: 'double'
id: 'person2'
condition:
- condition: template
value_template: "{{ is_state('input_boolean.'~trigger.id~'_home', 'on') }}"
- condition: template
value_template: "{{ is_state('input_boolean.'~trigger.id~'_in_bed', 'on') }}"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.{{ trigger.id }}_is_awake
But this gets an error:
Automation with alias 'People - someone - awake' could not be validated and has been disabled: not a valid value for dictionary value @ data['action'][0]['entity_id']. Got 'input_boolean.{{ trigger.id }}_is_awake'
Someone can put in the right direction how to fix this? Seems I’m using trigger.id in a wrong way in the action part.
Thanks a lot!