I’m fine tuning all my rules and consolidating as much as possible. Figure less rule trigger lookups on all my motion sensor changes should cause less load on the hub..... Maybe I’m wrong ..
Well, there is a happy medium. You don't want rules to be too large either. The one big thing to avoid is having a rule with triggers that can happen at virtually the same time. RM will try to spin up a second copy of the rule before the first is finished and that's not good. You'll get a "pop" error in the logs. Something like "cannot pop() null list". (Can't remember the exact words) So, while yes, having multiple rules with the same trigger is bad, there are worse things. I use the "call the other rule" technique when It's something multiple other rules have to do but I don't want to have to do it in every rule. Like turn all the lights off in the house. I have a rule that has only conditional actions that handles all the lights turning off based on some criteria (usually mode). That way, whenever I need to do that, I just make sure that I adjust the mode a couple steps before I call the "lights off" rule. If I add or change or move a light, i only have to go to one place to fix it, not 4 or 5. My "leaving home" rule runs a lot faster now that they're separate too. So, the technique you inquired about is an underappreciated function of RM.
Glad I found this thread. Quick question on calling another rule. Is there a way to pass the device that was triggered, or even a device that is not triggered. For example say I want a specific light to brighten/flash based on where motion is detected, can I have a a Rule that handles the brighten/flash that is passed the info about which device to act on?
I don't think there is in the sense of passing arguments to a function or subroutine but you could do it less elegantly with hub variables. Exception on trigger device noted below in @jwjr's post.
One other question about a Rule calling the actions in another Rule. Does the initial Rule wait for the rule it calls to return or does in continue on with its own actions thereby effectively running multiple sets of actions? For example if the rule being called conatains "wait for logic" will the initial rule wait as well?
No... the 2nd rule will spawn separately but the first rule will continue to execute. Unless you want to try something along the lines of what @672southmain suggests!
It all depends on how you want it to work. You could synchronize the called rule with the calling rule by using a WAIT in the calling rule for a change in a semaphore Hub variable that could be set by the called rule.
I think I got it, so if I want to wait I can wait for a variable change, if I want to run without waiting do nothing (even if the action I called has a wait, correct?
Yep. You could even use the variable to pass back completion codes, etc. just initialize the variable before calling the called rule so you can see the change. You could even use the initialization of the variable to pass a parameter. Be creative.