Simple sensor controlling light

I am trying to setup some simple sensors to control lights. They should trigger on motion and turn off after 10 minutes of no motion. Simple?
I tired using the blueprint for this but I can’t get the light to ever turn on. I assume I have the wrong names in places.
The system will not allow me to post the multiple screen captures of the configuration pages. What should I post to show this?
When I edit in yaml I get:
alias: Garage side light
description: ‘’
use_blueprint:
path: homeassistant/motion_light.yaml
input:
motion_entity: binary_sensor.z_wave_motion_sensor_home_security_motion_detection_2
no_motion_wait: 502
light_target:
entity_id: automation.garage_side_light

You have automation.garage_side_light as the light target. You need the entity_id of the light you want to control.

When I go to configuration->entities that is what is seen:

What should I be looking for?

What light are you trying to turn on? That’s a picture of the automation entity.

The problem with blueprints is you have no idea what they are doing so you don’t learn how it works… which means you can’t troubleshoot it when it doesn’t.

For a simple motion → light → delay off, a basic automation like the below will do the trick, I have this on my entry light, and it is ‘active’ between an hour before sunset to an hour after sunrise:

alias: 'Lights: Entry on motion'
description: ''
trigger:
  - platform: state
    entity_id: binary_sensor.entry_motion_detection
    to: 'on'
condition:
  - condition: or
    conditions:
      - condition: sun
        after: sunset
        after_offset: '-01:00:00'
      - condition: sun
        before: sunrise
        before_offset: '01:00:00'
action:
  - service: light.turn_on
    target:
      entity_id: light.entry_lights
  - delay:
      hours: 0
      minutes: 4
      seconds: 0
      milliseconds: 0
  - service: light.turn_off
    target:
      entity_id: light.entry_lights
mode: restart

Make sure your motion sensor is set for a motion timeout less than you have the light on for. I set mine for 10s, so they trigger on and off rapidly, and will restart the 4min timer each time further motion is detected.

One more suggestion… your motion sensor’s name is: binary_sensor.z_wave_motion_sensor_home_security_motion_detection_2
If you haven’t already, start using a naming convention, or you will end up in all kinds of strife when you get more than a handful of entities. Mine is binary_sensor.entry_motion_detection - type.location_subtype e.g. also light.entry_lights. You will save yourself worlds of pain later on.

Simon,
That sounds promising. I agree that the blueprints do seem to hide what they are doing. I am sure one can debug them but if you are using a blueprint, you probably don’t know how to do that. It seems to me that I once had a message that the service.: light.turn_on didn’t exist. I will have to investigate that.