alias: Brightness Dining Area Sync
trigger:
  - platform: state
    entity_id: light.ceiling_fan_1
  - platform: state
    entity_id: light.ceiling_fan_2
condition:
  condition: and
  conditions:
    - condition: state
      entity_id: light.ceiling_fan_1
      state: 'on'
    - condition: state
      entity_id: light.ceiling_fan_2
      state: 'on'
action:
  service: input_number.set_value
  data_template:
    entity_id: input_number.brightness_da
    value: '{{ trigger.to_state.attributes.brightness|float }}'
