Hoping I can get some assistance. I am trying to build a rule that does
If any contact is open for ten min send announcement saying what is open and repeat every 10 min until contact is closed.
Any assistance is really appreciated.
Below is what I have so far, but having some issues.
I think the issue is that you have the repeat after what you want, it should be
repeat every 5 min
This is from The man himself, this is his suggestion. I will give this a quick shot, however I have feeling it will work like a charm.
The Simple Conditional Action with a Repeat is a While-Loop. It's going to test that condition on each repetition. If it's false, it will skip the actions until END-REP. So, if all the doors are closed 10 minutes after this starts, it will drop out of the loop, and cancel the one delayed notification. That's why it is delayed 10:01, so that extra second allows the rule to stop if there is nothing to announce.
If this fails with multiple devices opening, then you'd have to break it up into rule per device. Ideally, this repeat notification should be built into Notifier instead.
I had no idea that Repeat was a block command. LOL Learn something new every day!
I had asked Bruce earlier for his help that is what he sent me. Looks striped down and straight to the point. He should know he wrote the code, lol.
Well crap... So I was at least close? LOL So, if you add in your contact sensors, does it work?
Give me a couple to get it built.
hmm, I guess I don't get how the cancel will be called if there is no trigger for the close. I will wait to hear how the rule works.
I cannot get mine to look like his, any ideas? His does not have a then and the repeat is on the same line, mine is not.
It'll format itself once you save it. Add your next action after the Repeat and it should format out properly.
I think he's using a simple condition in that example.
Simple Conditional Action
Ok, took me a min to get this created, notice 1 thing your example says cancelable, and mine says cancel, what did I do wrong there?
Thank you Bruce!!!! The rule works perfect!!!
I have one question, is there a variable that will give me the number of minutes the contact has been open?
I'm trying to add siren for 1 second. This doesn't work.
You know that each loop is 10 minutes. So you could use a variable that you increment each time through the loop (or add 10 to). Then you could use that in the notification.
So here we go, Final rule with the variable.
This rule worked for me but didn't work having all the doors under one rule. I copied this rule for each door. For every door, the time I set is never followed. It's random like 1,2,3, 5 minutes. How can I get it to follow the 10minutes time I put. My rule if below. The only difference between doors are the door name and times.
IF (Garage Entry Door open FALSE) Repeat every 0:10:00
Notify Jelyn Phone, Steven Phone and Speak on Living Room speaker: '%device% has been open since %time%' --> delayed: 0:10:01 (cancelable)
Cancel Delayed Actions
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.