Notify about door left open after all presence sensors have left

I figured this would be a simple task, but I'm stumped.

I just want to receive a push notification if the wife and are both away and a door is left open.

Can't seem to do it in simple rules, basic rules, notifier, and I'm not even sure about rule machine. Note, I do not use HSM.

I came up with this in RM but the triggers are OR. It needs to be AND.

I'd switch to Rule Machine then use

Trigger: Jess, Mike all away
If Contact Bedroom Window, Front Door, Upper Garage Door, House Garage Door any open then
Send Jess,Mike Warning one of the contacts got left open
End if

If you want to know which one you'd need to break it out into a seperate if statement and message for each contact since you can't use %device% since that would be the trigger (one of your cell phones)

Are you sure you can use all away as a trigger? I have a similar rule where I use ...

Trigger: Any leaves
If any present then exit rule
If contact....any open then.....

Okay, what am I missing here? My screenshot is from Rule Machine.

Am I supposed to have the presence and contact sensors in as two trigger events?

Also when I select presence as a trigger, our two phones are the only options to check. There isn't an Any.

You're right the only option is any then to check with an if statement. I have another rule where I set a virtual switch to away when everyone is away then use that switch in all my other rules to simplify things.

You just choose the two phones as leaves and hit ok it will trigger if any of those leaves so you'll also need an if statement to verify they are both away before proceeding like @Sakman suggested.

If you care about which individual device it was, I wrote a custom app to do this for myself that you might find useful:

Otherwise, a rule like @Terk suggested would do the same thing (just with a bit of work, possibly, if you need that many conditionals!). I also use a virtual switch/presence device instead of relying on individual devices (which I "combine" into that one device via other means), which makes a lot of automations like this easier, but that's just personal preference.

If you use my app, leave the "Text to speak if all devices are OK" option blank (or anything blank where you don't want it to say or send anything)--that way you won't get anything if all the contacts are closed--and choose only a notification device and not a speech/TTS device.

Use Mode Manager to create a new mode based on presence (there is "and" functionality there) and use the mode as a trigger.

I'm completely stumped where and how to add that IF statement.

Looking around the forum for other rule machines examples, none of them look like mine. Is there another place where you can see/edit rules?

I just found it after I submitted my post. "Conditional Actions".

I'm going to try this. If all else fails, I'll do it in Webcore. :slight_smile:

How about something like this.....

Screenshot 2021-05-04 135555

I'm trying to build this, but how how do you build the Exit Rule? I can't find that in the dropdowns under conditional action.

I'm really struggling with rule machine. haha

Not everything is easily identified by the subgroups but exit rule is under Delay or Repeat Actions, Wait.

I got frustrated and removed rule machine. :confused:

Here is the solution I came up with in Webcore if it helps anyone out.

What's up with all the unknown devices, Web Core can read the device names can't it?

Yeah, it's just because it's an anonymized snapshot to share. A user can use that code (m8duw) to import it, it'll let you select what devices from a checkbox list.

I'm not very proficient with it, but I'm a little more familiar with it from my S.T. days.

1 Like