Does a delay just pause the execution of the next rule for that x amount of time?
Turn Off all the lights
Store Speaker A volume property value in %volume%
Set Speaker A volume to 100 (Delay by 2 seconds to give time for speaker to get this command)
Text To Speech "The House Is Now In Away Mode" (Delay 5 seconds) This gives it time to get there and say what it needs to say before the next step returns the volume
Set Volume of Speaker A to %volume%
Does rule 4 run then pauses for 5 seconds before executing rule 5? I am assuming it works this way but I just want to double check.
PS It would be really awesome if the Google Home sent a response back to the Hubitat that execution of the command was successful. That way you could add a wait condition in the Rule Machine to "Wait till previous command is complete" or force forward after X seconds if no answer was received!
As stated, it depends on which way you set it up. For the same explanation in different words (and a note about how cancellation works--also different between the two types of delays), you can also see this post:
Ahh okay. Yes let me look at the rule when home, for some reason my VPN to home is down today either that my IP just changed and DYDNS is slow to update it. Ill let you know. Didn't know you could do both!!
Here is an extract from one of my rules.
When the actions are 'resolved', all four actions will put a delay into the scheduled jobs.
So in essence the actions execute at the time interval after the actions were resolved. (If that makes sense).
I could have out a 'Wait' in instead.
The wait, waits for the action above to execute then it moves on.
So I could have out in.
Wait 1 miniute turn on light 1.
Wait 5 seconds turn on light 2.
Wait 55 secs turn off light 2.
Wait 5 seconds turn off light 1.
To achieve the exact same thing.
I just went down the delay route. (Again, hope this makes sense. )
Yeah I didn't even realize there was a difference is why haha I guess kind of why I asked the question because funny things were going on, now i know why because the way i stated it in the question is the way i have it which would cause weird behaviors. I want it to execute lineally with the pause between steps and now i get it!
There's also a third option--you could have used a (standalone) "Delay" action instead of a wait. I guess the difference is mostly in how they can be cancelled: delays (standalone or on an action) can be cancelled with a "Cancel Delayed Actions" action if the "cancelable" flag is set. They can (less commonly...I don't think I've ever seen staff post an example like this) also be cancelled with a "Cancel Rule Timers" action from the same rule or another rule (which also cancels a bit more, including waits but also un-does periodic triggers and...it tells you what else). Waits also start over when any trigger fires and the rule actions begin running again; delays, unless cancelled, stay pending.
Cancel Rule Timers will also unschedule any periodic triggers the rule might have until you open the rule in the GUI and click "done". There is no programatic way to reschedule the periodic triggers.
That's why it's a very "drastic" way to handle delays. It's much better if you cancel the delay within the rule itself.
I'm still not sure what "rule you created," so a screenshot would be helpful. But I guess the same would apply to me, so here are my two examples from above. What we're talking about is this:
If there is nothing after your delay or delayed action, they are equivalent, but as you can see, with additional actions, the behavior is different: a delay on an action continues to run the remaining actions. A "standalone" delay action pauses the rule there. If you added cancellations, there would be an additional difference stemming from that (only the cancelable delayed action would be cancelled in the first rule; everything after the cancelable delay in the second would be cancelled--but only if i set the "cancelable" flag and had a "Cancel Delayed Actions" action, which I do not).
Insert a "Delay 0:05:00" (EDIT: or "Delay 0:00:05" if you wanted five seconds, as I mis-remembered...) as in my second example (in either post) between the desired actions. Also, I'm sure you're aware that, without triggers, these actions will never run unless you call them from another rule. (Also, depending on your speakers, some people like playTextAndRestore better than just playing the notification, which might stop anything you currently have going. Your luck may vary.)