alias: Turn kitchen nightlight off
trigger:
  - platform: state
    entity_id: switch.kitchen
  - platform: state
    entity_id: light.ceiling_fan_1
  - platform: state
    entity_id: light.ceiling_fan_2
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: light.ceiling_fan_1
      state: 'on'
    - condition: state
      entity_id: light.ceiling_fan_2
      state: 'on'
    - condition: state
      entity_id: switch.kitchen
      state: 'on'
action:
  service: switch.turn_off
  entity_id: switch.kitchen_nightlight
