# Rule to disable rule - or alternative solution

**URL:** <https://community.openhab.org/t/rule-to-disable-rule-or-alternative-solution/48217>\
**Category:** Scripts & Rules\
**Created:** [July 22, 2018, 10:38pm UTC](https://community.openhab.org/t/rule-to-disable-rule-or-alternative-solution/48217 "2018-07-22T22:38:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vzorglub](https://community.openhab.org/user_avatar/community.openhab.org/vzorglub/32/17166_2.png) [@vzorglub](https://community.openhab.org/u/vzorglub)\
**Post date:** [July 22, 2018, 11:45pm UTC](https://community.openhab.org/t/rule-to-disable-rule-or-alternative-solution/48217/2 "2018-07-22T23:45:00Z")

</div>

Please use the code fences when posting code:

> [@How to use code fences](https://community.openhab.org/t/how-to-use-code-fences/38383):
>
> We all have to type this content over and over and over. Here is a posting we can all point to when the topic comes up. Why use code fences? Because rules, sitemap, logs, and configs are all but unreadable when code fences are not used. When to use code fences? Whenever one is posting any sort of code, config, log, and any text where line wrapping, indentation, and using an equal spaced font makes the text more legible. How to use code fences? Use 3 backticks (```)... Or use \<code\>... …

> [@Gufti](#):
>
> Could somebody provide me an idea how to solve this

Install the expire binding

Set-up at new item:

```csv
Switch Washen_Timer { expire="10m, OFF }

```

Then your rules:

```php
rule “React on Waschen (Waschen_Switch) change/update”
when
Item Waschen_Switch changed from OFF to ON
then
    // something to disable the rule above for 10 minutes
    Washen_Timer.sendCommand(ON)
end

rule “React on Leistung (Waschen_Power) change/update”
when
    Item Waschen_Power changed
then
    if (Washen_Timer.state == OFF) {
        val wpwr = Waschen_Power.state as Number
        val pwrthreshold = 4
        if (wpwr <= pwrthreshold){
            sendTelegram(“cmhomebot”,“OpenHAB Info - Wäsche ist fertig”)
            sendCommand(Waschen_Switch, OFF)
        }
    }
end

```

The Timer item with get update to OFF 10 minutes after receiving the command ON

---

_[View the full topic](https://community.openhab.org/t/rule-to-disable-rule-or-alternative-solution/48217)._
