# Why "received command" run twice in .rule?

**URL:** <https://community.openhab.org/t/why-received-command-run-twice-in-rule/24016>\
**Category:** Scripts & Rules\
**Tags:** rules, bug, openhab2\
**Created:** [February 27, 2017, 6:57pm UTC](https://community.openhab.org/t/why-received-command-run-twice-in-rule/24016 "2017-02-27T18:57:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bagunda](https://community.openhab.org/user_avatar/community.openhab.org/bagunda/32/71032_2.png) [@Bagunda](https://community.openhab.org/u/Bagunda)\
**Post date:** [February 27, 2017, 6:57pm UTC](https://community.openhab.org/t/why-received-command-run-twice-in-rule/24016/1 "2017-02-27T18:57:05Z")

</div>

.items:

```csv
Dimmer DimmedZal6 "DimmedZal6 [%d %%]" <slider>

```

.sitemap:

```php
Slider item=DimmedZal6

```

.rules:

```php
rule "RULE_Dimmer_DimmedZal62"

```

```php
when

```

```php
	Item DimmedZal6 received command

```

```php
then

```

```php
	logInfo("Exec4", 'DimmedZal6 received command: ' + DimmedZal6.state.toString)

```

```php
end

```

/openhab.log:  
2017-02-27 19:29:53.043 [INFO] [eclipse.smarthome.model.script.Exec4] - DimmedZal6 received command: 0  
2017-02-27 19:29:53.235 [INFO] [eclipse.smarthome.model.script.Exec4] - DimmedZal6 received command: 0

I change slider value from page [http://192.168.1.3:8080/basicui/app?sitemap=demo](http://192.168.1.3:8080/basicui/app?sitemap=demo)  
 ![](https://community-openhab-org.s3-eu-central-1.amazonaws.com/original/2X/6/6521e28d3e1e2b23a57cef6eb8b1759567ce08ad.png)

And I getting twice “received command” from .rule.

Why?

---

<div class="post-metadata">

**Author:** ![rossko57](https://community.openhab.org/user_avatar/community.openhab.org/rossko57/32/70263_2.png) [@rossko57](https://community.openhab.org/u/rossko57)\
**Post date:** [February 27, 2017, 10:47pm UTC](https://community.openhab.org/t/why-received-command-run-twice-in-rule/24016/2 "2017-02-27T22:47:50Z")

</div>

Seems reasonable for sliders to send multiple commands when being slid.
