Logic issue with 'Door left open" rule

I can see why this goes off 5 mins after the door is open (regardless of whether it gets closed quickly or not) but can't get my head around the logic to only warn me if the door is open > 5 mins....any tips, please?

download the notifier app and use that instead


Alternatively if you need further logic or need this in rule machine

Trigger: door opened

Cancle timed actions
Delay 5:00 cancelable
If door opened
Notify pushover

While Notifications would be my preference for this (looks like you got it?), if you're still curious about the rule, all you'd need to do is check "Cancel?" On your "Delay..." Action. This will mark the action as "cancelable," which makes the "Cancel Delayed Actions" action you (correctly) included actually cancel it.

Alternatively, the rule suggested above is close but doesn't actually check that it stays open for 5 minutes (just that it happens to be open 5 minutes later, even if it was just reopened) (EDIT: didn't catch the combination of a couple things that would make this work--actually looks good!) Something like this is a close alternative:

Trigger: Garage door closed (hear me out on this...)

Cancel Delayed Actions
Wait for events: Garage door opened
Delay 0:05:00 (cancelable)
Notify XYZ

The tradeoff is that this rule won't do anything until the door is closed for the first time after you write the rule.

With the rule above the cancel delay sections at the begining of the rule will cancel any previous check if the door is reopened.

In fact the only issue with the first rule is that the delay is after the condition. So it was saying if the "door is open now...tell me in 5 min" instead of "wait five min and if the door is open tell me"

Using your suggested rule will create an additional event subscription.

1 Like

Ah, didn't catch the combination of things in your rule that would make that happen. The problem with the first rule, though, is the lack of cancellation on the delay, not where it's positioned. With this minor change, it would be nearly identical to several motion lighting examples (same concept, different devices) found throughout the Rule 4.0 docs (a paradigm staff no longer think is "simple" enough in most cases; I was trying to match what they think now, but you did a better job and creatively used a single subscription to accomplish the same goal--nice!).

1 Like

@hasty Not my thread, but this helped me understand what I was doing wrong with some of my rules. Thanks!

1 Like

Notifier works.

The rule didn’t include the cancelable on the delay.