# Opinion: to use or not to use: device status in AND

**URL:** https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706
**Category:** Flows
**Created:** [October 5, 2021, 10:49am UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706 "2021-10-05T10:49:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)
#### Post date: [October 5, 2021, 10:49am UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/1 "2021-10-05T10:49:59Z")

</div>

I would like to hear some pro’s and con’s of using the device status in the AND section.  
When switching a device you can add a status check of that device in the AND section:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/b/8bd2bb84c4c88122b8eba920af7ed64ad91722df.png)

Functionally it is not usefull: although a device that is off will not actually switch off, the flow will function just the same way.

A reason to add the Device check in the AND can be to reduce the load on a connected bridge or reduce the amount of communication:  
When you include the AND homey will not send a zigbee (or other) signal to switch the device off when it is already off. Resulting in less zigbee signals an less stress on a hue bridge (if that is used)

Curious to hear your opions and how you use it…

---

<div class="post-metadata">

### Author: ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)
#### Post date: [October 5, 2021, 11:56am UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/2 "2021-10-05T11:56:40Z")

</div>

Did anybody test/do signal measurement?: does homey actually send a command even when the status is already the desired status?  
(So does homey send an “off” command to a device that has the status “off”)

---

<div class="post-metadata">

### Author: ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)
#### Post date: [October 5, 2021, 12:00pm UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/3 "2021-10-05T12:00:58Z")

</div>

The ELSE action is a bit unnecessary and can be removed.  
Because the flow does this, if the heater is off:  
IF  
zone is active  
AND  
heater is Not on  
THEN  
switch heater off

This makes no sense to me.

Homey doesn’t check the status really, you tell Homey what to check at the AND section.  
AND  
-status = true do THEN part  
-status = false do THEN ELSE part _if action card is present_, otherwise the flow just has finished at this point.

This makes sense though:  
IF  
zone = active  
AND  
heater is on  
THEN  
turn heater off

Because when the heater is Off when the zone becomes active, the flow is finished, without sending an unnecessary “turn heater off” command

---

<div class="post-metadata">

### Author: ![DirkG](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirkg/32/118897_2.png) [@DirkG](https://community.homey.app/u/DirkG)
#### Post date: [October 5, 2021, 12:48pm UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/4 "2021-10-05T12:48:16Z")

</div>

You have stolen the flow… 😜

> [@How to structure your flows](https://community.homey.app/t/how-to-structure-your-flows/25109/38):
>
> Thank you guys for the tutorial, and all the comments. I’m still scratching my head when it comes to the “else” statement. I’m using it in 1 flow and it works as expected (turning off in 2 cases) see … I’m actually perplexed but I believe I don’t quite understand the potential of the “else” and how it relates to the “Trigger” and “AND”… maybe someone can explain it w/ a simple metaphor. Thanks

And as I wrote, this flow, respectively the ELSE card, makes no sense.

> [@FKey](#):
>
> So does homey send an “off” command to a device that has the status “off”

I just tried it with a Fibaro Wall Plug with this flow:

When…  
– This flow is started  
And…  
– Wall Plug is turned off  
Then…  
– Turn off

After execution of this flow, the time stamp of the onoff capability in Developer → Devices was updated.  
So the answer to your question is: Yes (with Z-Wave devices)

---

<div class="post-metadata">

### Author: ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)
#### Post date: [October 5, 2021, 1:28pm UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/5 "2021-10-05T13:28:39Z")

</div>

> [@DirkG](#):
>
> After execution of this flow, the time stamp of the onoff capability in Developer → Devices was updated.  
> So the answer to your question is: Yes (with Z-Wave devices)

OK so it does make sense to add the device status check to the AND: it will reduce the amount of (z-wave) communication…

---

<div class="post-metadata">

### Author: ![FKey](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fkey/32/14793_2.png) [@FKey](https://community.homey.app/u/FKey)
#### Post date: [October 5, 2021, 1:37pm UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/6 "2021-10-05T13:37:16Z")

</div>

> [@DirkG](#):
>
> You have stolen the flow… 😜

😊

---

<div class="post-metadata">

### Author: ![Edwin\_D](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/edwin_d/32/136417_2.png) [@Edwin\_D](https://community.homey.app/u/Edwin_D)
#### Post date: [October 5, 2021, 1:41pm UTC](https://community.homey.app/t/opinion-to-use-or-not-to-use-device-status-in-and/52706/7 "2021-10-05T13:41:05Z")

</div>

It reduces communication, but only if (as stated before) there is no ‘else’.

For KAKU and other unidirectional communicating devices I would however not recommend this. For those devices it is not uncommon for Homey to have the state wrong. A normal flow would correct this, making sure both the state and the device itself are set according to the user’s wishes. The check here would mean the flow does not work as expected and the state remains wrong until the user ‘toggles’ on/off.
