alias: Turn off office lights after no motion
trigger:
  platform: state
  entity_id: binary_sensor.office_motion_sensor_over_closet
  to: 'on'
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: light.office
      state: 'on'
    - condition: state
      entity_id: light.ericks_desk_lamp
      state: 'on'
    - condition: state
      entity_id: switch.lava_lamp
      state: 'on'
action:
  service: homeassistant.turn_on
  entity_id: script.office_lights_set_timeout
