Add time-of-day option to wait for timeout

I have a rule that may trigger at a different time each day, but the embedded wait for event should have a timeout that is based on a specific time instead of an interval.

Let's say the rule is triggered at 10 am on one day and 1 pm on another, but I am waiting for an event that should happen during daylight, so I want it to drop through the wait either on the event happening or at sunset. Currently, I'd have to use the variable to calculate the wait, but seems simpler just to add the option for a specific time.

What you want is already there -- just choose "Certain time (and optional date)" as the wait event capability.

But I'm waiting for a device to trigger and want to timeout when I hit a certain time, which is not what "wait for time" would do.

Just thinking aloud, but could you enter that timeout time as an additional trigger in the rule. Then in your actions put a conditional IF time is...exit rule (or whatever else you want it to do)

If time = timeout time, make a local variable or private boolean false. Also reset that to true at a particular time. Use Required Expression as the variable/boolean being true.

It might help to see your current rule to workout the tidiest way of doing it as from the initial post it seems as though you could just make a time period as the required expression...

A trigger is going to cancel any wait, with or without a timeout.

Or did you just mean you're waiting for a device event or a "timeout" (either elapsed time or a specific time), rather than an actual rule trigger event? If so, you can still do that. The action is "Wait for events" and lets you pick more than one, so just add the certain time as another event. You can use conditionals afterwards to figure out what really happened (including the value of the built-in %device% variable, which will be "timeout" if the timeout is the reason the actions went on).

Ah! That's the answer I need. I'll wait, for example, for the motion detector or a time of day as the two events, then sort things out after that.

Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.