How to activate/désactivé a rule?

I’d like to create a button or any other oh3 graphical components to activate/deactivate a rule.
Could you provide me with some guidance?
Thank you

I don’t believe that there’s any direct method, but there are certainly some fairly easy two-step solutions.

  1. Create a switch item attached to a toggle card or toggle widget. Include the state of the switch item in the “But only if…” conditions for the rule. The rule then will only ever run when that switch is in the desired state.
  2. If you really want to fully deactivate the rule then you will need two intermediate rules. With the rule creation UI you can have a rule that then has one of the actions listed under “Other rules” and this include activate another rule or deactivate another rule. You would need, I believe, one rule for when a switch item changes to ON and activates the desired other rule and a second for when the switch item chagnes to OFF and deactivates the other rule.

Thanks for those suggestions, I’ll have a try to the first one

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.