Trigger an action if condition exists for a set period?

Does anyone have a simple way to trigger an action if a condition has existed for a specific amount of time? For example, I would like to lock my utility door if the door has been closed and unlocked for two minutes. I currently use a repeating two-minute timer as the trigger to lock the door (after a two-minute cancellable delay) and a required expression that the door be closed and unlocked. This works, but the locking action could be anywhere from two minutes to four minutes depending on when the repeating trigger event occurs relative to the door closure and unlocked state occurs.

Seems that there should be a more straightforward of doing this?

Rule.machine triigger and select and stays that way option

1 Like

Here’s a sample rule showing @kahn-hubitat’s suggestion:

That is also how I would implement this.

1 Like

Thanks, gents. Implemented just as you suggest and it works GREAT. Don't know how I missed that option. Love this community!

2 Likes