Delaying a Motion sensor trigger

Hi i tried searching but i dont think im using the correct key words.

I am new, just bought a HA Yellow, but have everything set up as it was previously so ive done pretty well tbh, using the wizard, although I have looked at YAML and sort of see how it works.

I have one request though, I have a simple motion detected outside light with a hue motion sensor, and its a bit sensitive even on the lowest settings and just pointing down to the floor, so i thought making it only trigger the light after 2 seconds of movement would help, but im at a loss on how to do that using the wizard.

Adding a condition of the motion sensor with a duration of 2 secs just stops it working.

Just add a duration to the trigger

1 Like

You can add a time to the state trigger to do this.
State requires 2 seconds on before triggering.

For example:

platform: state
entity_id:
  - binary_sensor.motion_sensor_front_door
for:
  hours: 0
  minutes: 0
  seconds: 2
to: "on"
1 Like

That would just delay the light coming on though rather than only setting off if theres movement for 2 secs yeah?

thats what i need yeah thanks, does that go in the conditions or triggers section?

would this work? (ive just used the alert so i can test it works)

description: ""
mode: single
trigger:
  - type: motion
    platform: device
    device_id: f6a70478448730346c6bc6b8a33d04a4
    entity_id: binary_sensor.hue_motion_sensor_1_motion
    domain: binary_sensor
platform: state
entity_id: binary_sensor.hue_motion_sensor_1_motion
for:
  hours: 0
  minutes: 0
  seconds: 2
to: "on"
condition: []
action:
  - device_id: 16947212d1c63cc20c17b8d9085308a0
    domain: mobile_app
    type: notify
    message: There is someone at the front door

Both answers are the same basically.
It’s just a delay of two seconds.

For as far as I know the (hue) sensor always has a delay before returning to clear. So it’s not that a one second motion results in the sensor only giving a “motion on” for 1 second. I think it’s around 10 seconds

One cannot say to the sensor, when you see movement, you dont see it for two seconds.

1 Like

oh right so what i want to does isnt possible then

The trigger must be constantly active for the given duration in order to proceed with the automation.

Mine is basically just the UI representation of the YAML provided by Recte.

The crucial question is if your sensor is able to report such short motion duration.

1 Like

Not with the hue sensor for as far as I know.
I have a couple, but the motion is always on for at least 10 seconds.

FYI, the Ikea’s are way longer on.
I don’t know how about other brands.

1 Like

its a hue, i tried what you gave me the first time i set it up and all it dod was delay the action being taken

ok thanks both at least i can stop trying to make the impossible work LOL :smiley:

I also doubt that you can achieve what you wanted. I have some Xiaomi motions sensors and once triggered they remain on for roughly 2 minutes …

1 Like

In above you actualy want the motion sensor to be active for at least 2 seconds before it triggers.

But I understood you want a 2 seconds delay, before the trigger fires the action.
That means you should use a delay:

description: ""
mode: single
trigger:
  - platform: state
    entity_id:
      - binary_sensor.frontdoormotion_sensor
condition: []
action:
  - delay:
      hours: 0
      minutes: 0
      seconds: 2
      milliseconds: 0
  - service: light.turn_on
    data: {}
    target:
      entity_id: light.outside_front

stop posting in this thread