(De)activate rule by another rule

Hi guys,

I’m implementing a rule for irrigation control. (just for info)
I need to check the conditions on a regular basis to (5-15 minutes not clear yet). So the cron for the rule is setup like 0 0/5 * 1/1 * ? *
But there can be some conditions where the rule needs not to be executed (e.g. during night, or after completion)
Is there a possibility to activate or deactivate a rule by another rule to save ressources? (without even executing the rule)

Create a rule and choose “Other Rules” as the action.

image

Deactivating a rule won’t make a noticeable difference, so I wouldn’t think of it as saving resources. Rules don’t put much strain on your server.

As Russ suggested, there are two ways to go about this.

  1. Create your rule that triggers periodically with a cron expression, or even better triggers when your Item states change in a meaningful way. Add a rule condition (but only if…) to test whether the other rule should be disabled. If the conditions are met, the Action Russ screen shot will deactivate that rule. You’ll need a second rule to re-enable the rule when the conditions are such that the other rule should run.

  2. Just put the condition on the other rule to begin with. The rule will only run if the conditions have been met even when the rule is otherwise triggered.