Turn on lights for 10 minutes after motion detected


Turn on lights with a resetable off timer

This recipe will turn on a light when there is motion and turn off the light when ten minutes has passed without any motion events.

automation:
- alias: Turn on kitchen light when there is movement
  trigger:
    platform: state
    entity_id: sensor.motion_sensor
    to: 'on'
  action:
    service: homeassistant.turn_on
    entity_id: light.kitchen_light

- alias: Turn off kitchen light 10 minutes after last movement
  trigger:
    platform: state
    entity_id: sensor.motion_sensor
    to: 'off'
    for:
      minutes: 10
  action:
    service: homeassistant.turn_off
    entity_id: light.kitchen_light