Rule Help - "and stays" combined with a timeout

I've a rule I've been using a long time to bring on my landing and stair lights with the Landing PIR. It worked fine but due to both the position of the PIR there's a slight blind spot. Also I wanted the lights to come on as I'm ascending rather than when I'm up there stood in the dark. I've added a pressure mat half way up the stairs and amended the rule shown below to include that as a trigger:

The issue is the "Wait for event: PIR motion inactive and stays that way for 01:00"...

When I go back down the stairs and step on the mat, the rule will re trigger and wait for the PIR to go inactive and stay. It's already inactive when I step on the mat so will not report that again and the light will stay on.

I'm thinking I can just add a timeout on the "and stays". When does that timeout commence? Does the timer start at the same moment as the "and stays" timer so I can just set "and stays" to 1 minute and "timeout" to 1 minute 5 seconds?

Use Wait for expression. It'll look at the state of the motion sensor and start the stays timer instead of looking for an event.

1 Like

Thanks - I'll try that. I'll have to switch on logging for the rule as I'm finding that the pressure mat is not always triggering it as it should.

The pressure mat connects to the alarm > mqtt to Pi > node red > HE virtual contact

When testing the virtual contact at the end of the chain was going open every time I step on the mat but sometimes the lights aren't coming on. The nature of the pressure mat is that it will change state and return very briefly (fraction of a second)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.