Disable all rules


Is it possible to disable all rules with a rule, switch or script?

At the moment I have a lot of rules for lights, timers, blinds, sensors…
I need a way to disable them all at once in case of maintenance works or something.
I know I can add a switch in every rule but then i need to modify all my existing rules.



The only way to do it in the rules DSL and the old rule engine is to add the switch to each rule. With the new rule engine, you can disable rules, so you can actually write a rule to disable all of the rules. Here is an example using Jython… https://openhab-scripters.github.io/openhab-helper-libraries/Guides/But%20How%20Do%20I.html#enable-or-disable-a-rule-by-uid.

1 Like