brightness-living-room-sync.yaml 567 Bytes
Newer Older
Erick Hitter's avatar
Erick Hitter committed
1 2 3
alias: Brightness Living Room Sync
trigger:
  - platform: state
Erick Hitter's avatar
Erick Hitter committed
4
    entity_id: light.living_room_endtable_left
Erick Hitter's avatar
Erick Hitter committed
5
  - platform: state
Erick Hitter's avatar
Erick Hitter committed
6
    entity_id: light.living_room_endtable_right
Erick Hitter's avatar
Erick Hitter committed
7 8 9 10
condition:
  condition: and
  conditions:
    - condition: state
Erick Hitter's avatar
Erick Hitter committed
11
      entity_id: light.living_room_endtable_left
Erick Hitter's avatar
Erick Hitter committed
12 13
      state: 'on'
    - condition: state
Erick Hitter's avatar
Erick Hitter committed
14
      entity_id: light.living_room_endtable_right
Erick Hitter's avatar
Erick Hitter committed
15
      state: 'on'
Erick Hitter's avatar
Erick Hitter committed
16
action:
Erick Hitter's avatar
Erick Hitter committed
17
  service: input_number.set_value
Erick Hitter's avatar
Erick Hitter committed
18
  data_template:
Erick Hitter's avatar
Erick Hitter committed
19
    entity_id: input_number.brightness_lr
Erick Hitter's avatar
Erick Hitter committed
20
    value: '{{ trigger.to_state.attributes.brightness|float }}'