Best strategy for PIR sensors? (timing)

Has anyone come up with a working strategy for PIR sensors?

This is not a problem with the sensors which work reliably as designed or with HA which also works as designed but…

I believe there is a flaw with the design (of something*) which causes HA not to report when there is motion reliably enough to have 100% accurate automations.

*Maybe my logic?

My PIR sensors behave as follows: If the detector detects motion four times within three minutes it goes to ‘sleep’ for three minutes.

My problem is knowing the best off_delay to use in the HA sensor. It seems to me that HA does not recognise any further signals from the PIR in that period.

Say I have off_delay set to 180 (three minutes) and motion is detected four times at 30 second intervals. That is two minutes, after which the PIR will go to sleep with one minute of the off_delay still left to run. HA only recognises the first instance of motion so after one further minute HA will report ‘no motion’ but the PIR will be ‘asleep’ and unable to report any motion for a further two minutes.

It is this two minute dead time I am trying to find a solution to.

I am not sure there is a solution as things stand but I cannot be the only one with this dilemma so I wonder what others are doing?

I think if HA would reset the off_delay every time the sensor fires it might help…

I use HC-SR501 modules which have a trim pot for ON duration. This allows a hardware settable duration that the electronics will report an ON signal after last motion detected. I don’t use off-delay in homeassistant at all. This works perfectly for me.

If your PIR modules do not have this capability, you could wire up a 555 in monostable mode for a resetable tuner to get the same effect.

I use standard security pet immune PIRs (18 of) wired to a PI GPIO running Flyte’s GPIO-MQTT bridge. Works flawlessly.