blueprint: name: Sync with Entity description: Sync entities state with a given entity domain: automation source_url: https://git.thethomaas.net/TheThomaas/home-assistant-blueprints/raw/branch/main/sync_with_entity.yaml input: reference_entity: name: Reference entity description: Entity whose state will be mirored to other entities default: [] selector: entity: filter: domain: - input_boolean multiple: false target_entities: name: Target entities description: Entities whose state will be synced default: [] selector: entity: filter: domain: - input_boolean - switch - light multiple: true target_entities_inverted: name: Target entities (inverted) description: Entities whose state will be synced in reverse default: [] selector: entity: filter: domain: - input_boolean - switch - light multiple: true mode: restart max_exceeded: silent triggers: - trigger: state entity_id: !input reference_entity from: "off" to: "on" id: turn_on - trigger: state entity_id: !input reference_entity from: "on" to: "off" id: turn_off actions: - choose: - conditions: - condition: trigger id: "turn_on" sequence: - action: homeassistant.turn_on metadata: {} data: {} target: entity_id: !input target_entities - action: homeassistant.turn_off metadata: {} data: {} target: entity_id: !input target_entities_inverted - conditions: - condition: trigger id: "turn_off" sequence: - action: homeassistant.turn_off metadata: {} data: {} target: entity_id: !input target_entities - action: homeassistant.turn_on metadata: {} data: {} target: entity_id: !input target_entities_inverted