Need help with simple rule to notify if door is open at 10 pm

I’m nearly finished transitioning from SmartThings, but am stumped how to recreate a simple routine I used to use: At 10 pm, check to see if three doors (contact sensors) are open and if so, send a notification.

I’ve tried creating this in Basic Rules and Simple Automation Rules, but in each case the trigger is a door opening, not a door that is already open. (Technically, Basic Rules also allows for “opened and stayed open” but that’s too inflexible, since the time open could be anywhere from a few minutes to most of the day.)

I did have success with Visual Rules, but unlike the other options, I apparently can’t use %device% to identify which door was left open. I guess I can live with that as the same limitation existed with SmartThings, but I’d really like to take advantage of the option if I could.

And call me a wimp, but I’m really not quite ready to dive into Rule Machine at this point.:face_with_bags_under_eyes:

1 Like

I forgot to add that the same limitation applies to the Notifications App–it appears to work only when a contact sensor is closing (or opening), not when it is already open.

trigger would be time of day. then if statements with notifications that check what is open

1 Like

When building rules in any of these apps, Triggers are always events and Conditions are always states.

“Garage Door opens” (or becomes open) is an event, and “Garage Door is open” is a state.

3 Likes

OK, I see the logic you’re describing, but I don’t see how to apply it. Basic Rules seems to require a trigger, not a state. Surely something as fundamental as sending a notification that a door is open should be possible?

That is one of the limitation of basic rules, being very basic.

Take a shot at Rule Machine. It seems harder than it is and you will be happy later that you started using it now when you do have more complicated rules later. You can always post questions and many people will help you out when and if you get stuck.

A trigger always has to be an event though - a trigger can’t ever be a state.

For your rule, Time =10:00pm could be the trigger, and then the actions would be driven by the state of the sensors at that time – i.e., “if Sensors X, Y, or Z are open, the notify [whoever]”

Rule machine is your friend.

3 Likes

There is a nifty custom app called “Is my home secure” by tslagle13 that really simplifies this without writing any rules. Available in Hubitat Package Manager.

1 Like

Writing your first “rule” is the gateway drug. Well worth the trouble. Hubitat nirvana is on the other side. :slight_smile:

Also greatly facilitated by the judicious use of Hubitat Package Manager.

3 Likes

Consider also if you want a notification if someone opens the door at 10:05 PM and leaves it open (and for how long?). That’s when things get a bit more complicated. Start with thinking about exactly what you are trying to cover for in this one rule.

1 Like