Skip to content

Instantly share code, notes, and snippets.

@BoxedBrain
Created September 24, 2025 17:56
Show Gist options
  • Select an option

  • Save BoxedBrain/7a432780f46db193526c602ef627860f to your computer and use it in GitHub Desktop.

Select an option

Save BoxedBrain/7a432780f46db193526c602ef627860f to your computer and use it in GitHub Desktop.
Sync Entity State to Multiple Targets
blueprint:
name: Sync Entity State to Multiple Targets
description: >
Set the state of a source entity (e.g. KNX switch) on one or more target entities (e.g. Zigbee lights).
domain: automation
input:
source_entity:
name: Source Entity
description: The entity to watch (switch, light, etc.)
selector:
entity: {}
target_entities:
name: Target Entities
description: List of entities to mirror the state to
selector:
entity:
multiple: true
mode: parallel
trigger:
- platform: state
entity_id: !input source_entity
action:
- variables:
source_state: "{{ trigger.to_state.state }}"
- choose:
- conditions: "{{ source_state in ['on','off'] }}"
sequence:
- service: homeassistant.turn_{{ source_state }}
target:
entity_id: !input target_entities
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment