I have been fiddling around with getting a solution to this problem, but not found any.
This is my setup: I have a PIR sensor covering the area leading up to my front door. If someone approaches the house, it triggers and plays a sound, so I know someone is there. However, to not annoy me when the motion is expected, I want to limit this action to happening:
only if it has passed a certain time (let’s say 5 minutes) since the last time the “someone approaching” sound was made, otherwise it gets played all the time when someone stands outside the door chatting for a while,
nor play if the door magnet sensor has indicated the door has been opened (since then the motion is due to someone leaving the house), for a certain time (let’s say 1-2 minutes).
I’ve looked at solution to “rate limiting” but they all basically assume that it’s just a single trigger that should limit the rate, here I’m trying to get either the PIR sensor or the magnet sensor to inhibit the rule for a time. Anyone got any ideas?
Thanks @anon43302295! I was thinking along those line but didn’t really get it all together. Now I’m creating an “inhibit_motion_report”, using the suggestion from Limit automation triggering to make sure it’s not triggered while being restored, which would mess up things.
It’s still not really correct - if the motion report is inhibited, and the time for that is almost up, and the door is opened, then I would want the timer to start over again. But it’s unlikely to happen often enought to be a problem
A third automation that triggers when the door is opened, checks that the boolean is on, then switches the boolean off, then on again would restart the timer and solve the latter problem