Confused on FORor Duration in Automations using Aqara P1 Sensors & ESPHome

Using the GUI for automations only. When you create a trigger there is a box call “for” or DURATION…If I put 2, 5, 10 min I do not understand how that all times out with motion sensors like the Aqara P-1 (all over my home) which I have and ESPHome used for the bed.

My automtions are not firing correctly. Do the Aqara and ESPHome sensor have a delay period that over rides what I put in the “for” box.

Which has precedence or I need to shorten my “for” time to some unknown sensor delay.

The way I understand “for” to mean I want something to be happening/not happening for a period of time before it moves next to then do the action.

Thx

That’s correct.

Most motion sensors turn on (“detected” in the UI), then off (“clear”) again after 10 seconds or so the time can vary a bit depending on the manufacturer.

In a lights automation, you would only use the “for” box to turn off the light. So the on command is issued every time motion is detected (if the light is already on sending the command again makes no difference), but the off command is only issued if no motion has been detected for 2, 5, 10 minutes - whatever you have in the for box.

There’s a good example of a motion sensor automation here: