Hi,
I am trying my first texts with blueprints and automation.
I want to make a blueprint that:
- takes a list of entities (switch)
- when you turn on one of them, it turns off all the others.
Maybe it’s something that can be done in a different way, but that’s not the point, I want to learn how to do it using blueprints.
I am trying something like this.
blueprint:
name: Alternative switches
domain: automation
input:
switchList:
name: List of switches
selector:
entity:
domain: switch
multiple: true
trigger:
- platform: state
entity_id: !input switchList
to: "on"
action:
- service: switch.turn_off
#entity_id: !input switchList
entity_id: {{ (!input switchList) | recject("equalto",trigger.entity_id) }}
mode: single
When I set action to entity_id: !input switchList
, of course it works.
I want to exclude the the entity that triggered the automation.
But when I try:
entity_id: {{ (!input switchList) | recject("equalto",trigger.entity_id) }}
everything stops working.
Thanks,
Roberto