1 Rule starts another rule

Hello I am new to RM and have a questions. Here is a scenario, if I have 2 rules, A and B, and code in Rule A triggers rule B. My question is, does Rule A pause until Rule B is ran complete or do after Rule A triggers Rule B they both go on simultaneously to finish their code?

thanks for your help!

They run simultaneously. Depending on the rules, you might be able to combine them.

Thank you. I wrote a rule for my garage door to monitor and send notifications if is open after sunset longer than 20 minutes. After 3 notification intervals of 20 minutes, it will send the signal to close the garage door automatically. Everything works as expected, except when the garage door fails to close. I put in a check for this case, essentially a wait 20 seconds and check the sensor state if it is closed. If it is open, I need to re-trigger my original rule to check if it is open. Since I can't find away for a rule to basically reset itself and re-run. I created a second rule and a global variable to do this. The original rule will fire off the second rule, and then exit rule. The second rule delay actions 5 second to ensure the original ended, then set a global variable to stuck, which should trigger the original rule again.

I did not see any other way of doing this and hope I am not creating an endless loop...

Can you post a screenshot of your monitor and notification rule? Based on this description, you might be able to wrap all of this under one rule as a repeating action and use the Repeat While Expression to end it. The expression would be the garage door is closed, while the repeating actions would be your notifications and close door commands.

The rule that starts obviously goes first. Once the actions of the second rule are triggered by the first rule, they both rule simultaneously until one or the other finishes first. Unless of course you have other Rule Machine logic to pause the first rule until the second has finished and then resume the first rule, etc..

Above i have an embedded if loop that runs a certain rule if garage door did not close. Since every one says both rules will run simultaneously then this should work...

Second question on my trigger of open and stays open for 20 minutes... does is this a current state check or triggered by it actually opening? Ie... if garage is open prior to sunset, and crosses that time period and is open longer than 20 minutes will it trigger?

Thanks for all the input

The trigger must, well, trigger - for the actions to run. The triggers will not trigger when the required condition is not true. However I think this rule is probably still going to work the way you want it to.

"Garage door open and stays that way for 20 minutes" means the trigger is the event of the garage door opening, but then it starts a 20 minute timer after which it will recheck the garage door and only trigger if it is still open.

If the garage door opens 5 minutes before sunset, then when it is sunset and the required condition is met, the rule will be waiting for a trigger to happen. The door BEING open is not a trigger.

However you have 'when time is sunset' as another trigger, so the rule is always going to trigger exactly at sunset, whether the garage door has been open for 5 seconds, 5 minutes, 5 hours as of sunset.

I wasn't 100% sure how the required condition of 'between sunset and...' would interact with a trigger at sunset. I just tried a test rule with a required condition of 'between xx:xx' and 'yy:yy' and a trigger of 'at time xx:xx' and it did trigger.

Maybe someone else can comment on whether this is always going to work. I think with a trigger of 'at sunset' I might make the required condition start from 1 minute before sunset just to be certain the required condition clears before the trigger occurs.

Thank you for the input. I tested this yesterday by opening the garage door a couple of minutes before sunset, The rule never triggered. I will try adjusting to 1 minute before sunset.