Piston with time

Want to create a piston when contact is opened it for 10 min it will send an announcement to Alexa. If it is still opened 5 min it will send another announcement. Every 5 min until closed. I have figured out how to send Alexa announcement from voice monkey. But can’t figure out how to set up the every time until closed.

Maybe this approach from @Carlos_Juarez and @James

2 Likes

That’s turning on and off. I wanted if not closed in 10 min. 5 min later send reminder and so on until closed

The part I linked to was for the repetition part.

So your main rule has the trigger for 10 minutes open. Then use the trick from the linked thread to flip a boolean variable true/false after a 5 minute delay to repeat periodically with an IF condition to make sure it’s still open (usually a separate rule is easiest for this)

Something like:

Trigger:
Contact stays open 10 minutes

Flow:
Send Notification
Delay 5 minutes
IF contact stayed open 6 minutes*
THEN
Set $ContactRepeat true

.
.
.

Then I would use a second rule

Trigger:
$ContactRepeat changes to true

Flow:
Set $ContactRepeat false
Send Notification
Delay 5 minutes
If contact stayed open 6 minutes*
THEN
Set $ContactRepeat true

.
.
.

The trick here is waiting 5 minutes, then checking to see if the contact was still open for more than 5 minutes (I used 6 just to be safe) then flip the variable to true… that kicks off another rule that sends the notification and repeats the cycle of waiting 5 minutes before checking if it’s still stayed open for the past 5+ minutes.

Looking back on it, these could probably be combined into a single rule. Basically the flow from the second one, but with both triggers from each example I gave…