# OH3: Race condition on sendCommand and received update rule regarding items?

**URL:** <https://community.openhab.org/t/oh3-race-condition-on-sendcommand-and-received-update-rule-regarding-items/121255>\
**Category:** Development\
**Created:** [April 23, 2021, 7:30am UTC](https://community.openhab.org/t/oh3-race-condition-on-sendcommand-and-received-update-rule-regarding-items/121255 "2021-04-23T07:30:04Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![struppie](https://community.openhab.org/letter_avatar_proxy/v4/letter/s/6f9a4e/32.png) [@struppie](https://community.openhab.org/u/struppie)\
**Post date:** [April 23, 2021, 3:26pm UTC](https://community.openhab.org/t/oh3-race-condition-on-sendcommand-and-received-update-rule-regarding-items/121255/5 "2021-04-23T15:26:16Z")

</div>

Many thanks for your valuable comments!

If I read [this former comment from you](https://community.openhab.org/t/oh2-checking-state-after-rule-received-command/28373/2) and [this part of the documentation](https://www.openhab.org/docs/configuration/rules-dsl.html#event-based-triggers), then my understanding is:

- sendCommand(x) sends a command and the according binding acts on this by sending it to the device
- Here I don’t have a binding, but just a pure item. Therefore the autoupdate gets for sure involved and updates the item’s state.

But one question:  
Can I expect in a rule fired by “received **update** ” in this scenario, that the item’s state is for sure set to the value which I sent via sendCommand?  
Or is the same true, which is documented in the link above for rules fired by “received **command** ”: Means it may happen, that the rule is triggered **before** the item’s state is updated!

---

_[View the full topic](https://community.openhab.org/t/oh3-race-condition-on-sendcommand-and-received-update-rule-regarding-items/121255)._
