alias: Turn off kitchen light after no motion
trigger:
  platform: state
  entity_id: binary_sensor.kitchen
  to: 'on'
condition:
  condition: or
  conditions:
    - condition: state
      entity_id: switch.kitchen
      state: 'on'
action:
  service: homeassistant.turn_on
  entity_id: script.kitchen_light_set_timeout