Sensor check in specific modes or at specific time

Is there a way in rules engine to check if sensors are open after a specif time or in a specific mode? Webcore can do it I believe but was curious of thoughts here?

So specifically, when mode changes to ‘asleep’ alert me if garage is open.

Thank You!

1 Like

@Tommy You can add Garage Door open as the trigger, and use IF_condition to determine if it is in specific mode or during a certain time.

In the IF_Condition, don’t forget to change the logic from “All” (AND) to “Any”(OR), so when either one of the conditions is met, it will run the activities in “Then” path.

James generally has you pointed in the right direction, but I think the trigger and condition would be swapped based on your specific example.

The trigger would be the mode changing to asleep.

Then you could setup an IF condition for the garage being open and as James showed in his screenshot, optionally restrict it to night time only.

And here’s some good info on triggers and conditions:

That’s right. I misread @Tommy’s trigger. Thought he wants to get notification when garage door is opened during certain time or at certain mode. But if it is to check the door status when mode status is changed or at a specific time. Then the mode change and timer can be used as the triggers, so either one will trigger the rules.

1 Like

Awesome. Thank You!

I’ll work on this. Thanks @James @josh

Is this look right?

1 Like

Depends on what you are looking to do. :smiley: That rule will trigger anytime either garage door opens and will only send a message if the mode is currently ‘Asleep’. If that’s the desired goal, then yes!

On the other hand, if you want to check if the garage door is currently open when the mode changes to asleep, then you may want to swap the Condition and Trigger.

I can see how there might be a use case for both situations:

  1. If the garage door opens and I’m already in sleep mode, let me know
  2. If I change to sleep mode and the garage door is already open, let me know

If you want to handle both scenarios, you can either create two rules or combine the logic for both into a single rule.

1 Like

How would I switch it? It doesn’t appear that I can. I’m sure I’m missing something.

I just meant manually swap them. Remove it from the trigger and put it in the IF condition and vice versa. :grinning: