Most efficient way to check status of switch during certain hours

So trying to set up a rule to turn on an Inovelli notification child-device if my garage tilt sensor is open after 9:00pm and before 5am.

I'm not sure how to trigger this possible. It seems wasteful to say..."Run every 5 minutes" all day just to immediately IF (time > 9pm OR time < 5am)

Is there some better way to do this?

Do it the other way..

WHEN the tilt sensor changes, check the time.

That was my first thought, but I can't do that....cause I might have opened the garage door at 7pm, and now it's 9pm.

Imagine a Rule (IF THEN END-IF) that deals with the Tilt sensor going from closed to Open.. and responding to that.

Then layer on another Rule (IF THEN END-IF) that deals with the extraordinary case of 9PM.

IF Time = 9pm AND Tilt Sensor is Open.. THEN... and end with a END-IF

(Both pieces can go in one Rule, by the way, but it's often helpful to solve each problem individually.)

3 Likes

but what's the trigger for that rule?

I mean if I open the garage during the day, at like 4pm. Then forget to close it...what will trigger it to check if it's open after 9pm?

You can enclose the check for time conditional within a repeat that is canceled when the door sensor is in the closed position.

Edit: So this way, even if you open the door at 4:30, have the repeat occur every 15 minutes, the door opening at 4:30 will trigger an action that occurs at 9:00 pm.

1 Like

Ok I like this! Especially because my next step was to allow it to be open for a period of time without warning (even if I open it after 9pm to take out the garbage or something)

So if I check every x-minutes, I'll set a boolean (GracePediod = True or something) and upon next check if it sees grace period was true, THEN it alerts.

Will try this out tomorrow, thanks to both of you!

1 Like

Here's my logic...

It's 9 pm.... the door is open, or it's closed. That's the only two choices. You care about One of the choices.. that it's open.

Any other time, when the door does Open, you check time and it's either within the 'care about it' window or it's not.

So I'm back to...
Screen Shot 2020-04-20 at 6.48.13 PM

EDIT:
I clearly missed AND Garage Tilt Sensor open in that 2nd IF/END-IF by trying to be too speedy in creating... :frowning:

(Obviously I'm using the Hank RGBW bulb to emulate your Inovelli LED strip... AKA "the alert")

You can also do this as a ELSE-IF:

Screen Shot 2020-04-20 at 6.58.44 PM

2 Likes

I see what you are saying now...i wasnt getting it before. Thanks!