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

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

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…

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”)

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

You have stolen the flow… :stuck_out_tongue_winking_eye:

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

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)

1 Like

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

1 Like

:blush:

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.