Hello,
I am new to automations. I would like that everytime the state of the entities (media_player.zone_11, media_player.zone_12, media_player.zone_14) changes, the corresponding helper variable also changes. I know this may seem pointless, but I am hoping to use it in a more advanced automation later so that I can recall a previous state
Only the zone_11 works below, zone_12 and zone_14 trigger the script but the corresponding helper variable doesn’t change. What am I doing wrong? This is probably a silly way to do this, but I am new, if there is a better way I am open to that too.
alias: New Automation
description: ""
trigger:
- platform: state
entity_id:
- media_player.zone_11
- media_player.zone_12
- media_player.zone_14
condition: []
action:
- choose:
- conditions:
- condition: template
value_template: "{{ trigger.entity_id == media_player.zone_11 }}"
sequence:
- service: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.zone1
- conditions:
- condition: template
value_template: "{{ trigger.entity_id == media_player.zone_12 }}"
sequence:
- service: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.zone2
- conditions:
- condition: template
value_template: "{{ trigger.entity_id == media_player.zone_14 }}"
sequence:
- service: input_boolean.toggle
data: {}
target:
entity_id: input_boolean.zone4
mode: queued