RM5.1 - Pause/Resume cascade or Required Expression gating?

OK, so here’s some background first. I have a multi-stage gating system that I use to suppress things like motion notifications, alarm sirens, and security notifications. It works like this: Level 1 is triggered by a variable value change, which pauses interior motion notification rules. Level 2, also triggered by variable change, pauses exterior notification rules (doors opened, carport motion, etc) AND enforces level 1. Level 3 suppresses auto-lock rules, plus enforces levels 1 and 2. Level 0 resumes all rules and turns suppression off.

Sometimes I notice that even if the log shows that the variable changed first to enforce notification suppression, it seems often a notification sneaks out before being paused. For example, when we are arriving back at home, the vehicle’s BLE tracker always is detected a small distance from the driveway, and it’s presence is supposed to suppress the “motion in carport” notification by setting the variable to level 2 and pausing those rules. Generally, even though there is a couple of seconds between the “arrival” and the car being able to trip the motion sensor in the driveway, but the actions still take long enough that the motion alert still manages to get out.

So, I realized since I already have he machinery in place to drive the variable values, maybe I should just remove the “Level 1, Level 2, etc” rules that do the pausing and resuming and instead use Required Expressions IN the actual notification rules instead to gate the notifications. That way nothing is being paused or unpaused, the rules simply don’t fire when the variable values are changed.

My actual question is, internally, is there much difference between rule pause/resume vs whatever machinery controls the Required Expression flipping? The second method sounds much more efficient, leading me to think I should take the time to switch it over, but I didn’t know if that would actually increase the responsiveness of it all..

Thoughts?

Does the

That would be my preferred approach, as that's somewhat what Required Expressions (RE) are defined for, and I believe it's more of a light-weight approach versus Pausing/Resume rules.

JMHO, and to be honest, it would require actual testing to know which approach is faster, but RE's seemed to be "designed" for what your trying to do with "gating" various rules -

As for the questions of how does this work internally, within RM, I doubt that you get a detailed answer, as that would be sort of a @bravenel sort of response, and he hasn't been visible/active since about a year ago.. (Hope he is enjoying retirement!)

I'm not using RM, but my automations simply do a check for a virtual switch being on, to complete the automation rule or not. This is how I disable room sensors from turning on lights, I just turn off the switch. I have one virtual switch for each room to turn off automations.

I wouldn't use a variable, as they are harder to change for me than a switch, which can be put on a dashboard or changed with a voice command from Alexa.

Have you thought about just using a multi-state virtual device instead of a variable? A virtual dimmer might be good for this, as you could use level to set your levels (it even match how you refer to "levels" of surpression.)

With a virtual dimmer, you could use the switch state to "turn off" all suppression, as that would set level to 0. If you turn on the switch, it would go back to the last set level. Otherwise, just set level to your level of suppression. The switch will also turn on when any level is set directly, so on tells you there is some level of suppression being applied.

Then just check dimmer level in rules to get your level of suppression, to use in a required expression for those automation rules to be disabled or not.