Required expression enhancement

Can we have an enhancement to required expressions in rule machine that is something like other rule must be paused, stopped, or some other status that isn’t running? ( I am not sure of all of the disabled rule statuses )

I’d like to have a set of rules that only run if another set of rules are paused for instance.

Tagging @bravenel to make sure he sees this. Just to get his opinion on it.

2 Likes

Could you not achieve this using a virtual switch or global variable? In one set of rules you have a restriction based on the switch or variable being off, with the other setup of rules restricted by the switch or variable being on? Unless you can have a situation where both sets of rules can also be enabled at the same time....? Still achievable, particularly with a global variable that is a string, allowing for any number of states, such as "on", "off", "default".

2 Likes

I am aware there are other ways of doing it, and I have those implemented. I still feel like this is a valid enhancement request to the rules engine because it reduces the need for extra logic to the end users and conforms to the same standards already set by the app.

The subject of the post wasn't meant as a request for a solution. It was really meant as an enhancement request. I know that Hubitat employees monitor this room.

Rule paused/resumed is already a feature for both Conditions and Triggers. For stopped the simple answer is no, there can't be a feature to detect it. Stopped is tantamount to making the rule have the state before it was installed. As such, the rule is not running, not queryable, has no event subscriptions, etc. Stopping a rule is a maintenance step only, and should not be the subject of other rule's logic.

Hmmmm.... Because I didn't see it for a required expression:

Am I missing it?

OK, I see that now. There must be some reason that was excluded from Required Expressions, although off hand I don't recall what it is. My guess is that it introduced some untoward complexity of implementation when Rule Paused is also used as a Trigger.

Since you can use it as a Condition, you can just make the first action of a rule be IF (rule paused) THEN, .... and get the same outcome.

1 Like

Yeah I know, it's just visually it nice to look at rule machine and see which rules are paused and which rules are not.

Is there any way someone can re-visit getting that added to a required expression? I worked around it by using a global variable but I feel like this is a good enhancement request.

I don't need work arounds as I've already found them. I am looking for ease of use as I start building more out.

1 Like

This is much more complicated than meets the eye, and I see now why it was excluded from Required Expression. While theoretically possible, I don't see adding this.

1 Like

Download the Hubitat app