Files
home-assistant/blueprints/automation/homeassistant/copy_entity_state.yaml
2025-11-05 18:56:38 +01:00

64 lines
1.3 KiB
YAML

blueprint:
name: copy-light-entity-state
description: Copy state from light entity to light entity
domain: automation
author: Tiziano Trabattoni
input:
source_entity:
name: Source Entity
description: Entity to copy state from
selector:
target:
entity:
domain: light
destination_entity:
name: Destination Entity
description: Entity to copy state to
selector:
target:
entity:
domain: light
mode: queued
max_exceeded: silent
variables:
src_entity: !input source_entity
dest_entity: !input destination_entity
triggers:
- trigger: state
entity_id: !input source_entity
from: "off"
to: "on"
id: turn-light-on
- trigger: state
entity_id: !input source_entity
from: "on"
to: "off"
id: turn-light-off
conditions: []
actions:
- choose:
- conditions:
- condition: trigger
id:
- turn-light-on
sequence:
- action: light.turn_on
target: !input destination_entity
data:
brightness_pct: 100
- conditions:
- condition: trigger
id:
- turn-light-off
sequence:
- action: light.turn_off
target: !input destination_entity
data:
brightness_pct: 0