Incredibly simple way to bond the states of 2 entities together,
NB. not to be confused with “groups”, this would usually be used to bond the states of physical devices.
Dual:
blueprint:
name: State Bonding - Dual
description: Bind 2 entities together to act in unison (selected entites must all support the same state values)
domain: automation
source_url: https://community.home-assistant.io/t/state-bonding-dual/264183
input:
switch_1:
name: Entity 1
selector:
entity:
#domain: switch
switch_2:
name: Entity 2
selector:
entity:
#domain: switch
trigger:
- entity_id:
- !input switch_1
- !input switch_2
platform: state
action:
- entity_id:
- !input switch_1
- !input switch_2
service: '{% if trigger.to_state.state == "on" %} homeassistant.turn_on {% elif trigger.to_state.state == "off" %} homeassistant.turn_off {% endif %}'
You can extend this blueprint to include any number of entities simply by adding more inputs and adding them to the “entity_id” lists in the “trigger” and “action” sections