Hi @bravenel, I have a new rule with a nested 'if' one of those ifs has a delay and another 'if' after to recheck a variable (which can be changed by another rule) before it performs the final action. It all worked fine but the logs showed an error due to 'Multiple simultaneous rule execution error' on the remaining 'end ifs'. Is this expected and/or in this case do I need to 'exit rule' after the delay? Thanks.
Error speaks for itself. Yes, this is expected. IF-THEN with embedded delays will fail if triggered multiple times while a delay is pending. There are ways to prevent multiple simultaneous execution, but you should re-think what you're doing...
Ok, thanks
If the point is just to update your variable when any (and not all) of the presence sensors mark arrived, then you would probably be OK with using a private boolean to prevent the rule from running anymore after the first trigger. You could also start the actions list off with cancelling delayed actions. Not sure what else you've got going on though.
Any further triggering events are handled, flowed through, and cleaned up fine. After the delay is over the rule throws those errors on the last 2 end ifs which were never completed from the first trigger.
It's no big deal as the rule worked it's just these errors were thrown. I'm attempting a new present/not present algorithm that works better for my use case and this was the first version. I'll look at alternate ways of doing it as Bruce suggested. The other presence combiner apps just weren't working out with the issue with Samsung phones.
That said. If you want to allow the rule to retrigger while the delay is taking place …
You could insert the first line to cancel delays
Or
Change your delay to a wait for elapsed time.
Note: I prefer the second option.