alias: Brightness Living Room Sync
trigger:
  - platform: state
    entity_id: light.living_room_endtable_left
  - platform: state
    entity_id: light.living_room_endtable_right
condition:
  condition: and
  conditions:
    - condition: state
      entity_id: light.living_room_endtable_left
      state: 'on'
    - condition: state
      entity_id: light.living_room_endtable_right
      state: 'on'
action:
  service: input_number.set_value
  data_template:
    entity_id: input_number.brightness_lr
    value: '{{ trigger.to_state.attributes.brightness|float }}'
