Flow with activity in several zones

I have one flow triggering a light when “any” of two zones become active (front of house and driveway). It works fine.
I also have a flow for turning the light off when “all” zones has been inaktive for three minutes that doesn’t work at all. I fail to understand where my logic goes bad.

1 Like

Two different triggers for an ALL NEVER work!

Or in other words

What probably is ment that the lights shall only go out when both zones are inactive. So there has to be a test that both zones are inactive.

1 Like

Dear PerJon,
That is a usual misconception many users had (including me).
“All” does never work with different When… cards, as it only looks at the moment when one is triggered and does not wait for the other one.
My proposal is that you connect the When… cards with Any and then check if both conditions are met with And… cards.
Alternatively you check after each When… card if the other condition is met with an And… card and then combine them with Any.

Hi DirkH
Something like this?

WHEN zone 1 is inactive for 3 minutes
AND the zone 2 is inactive
THEN ………
WHEN zone 2 is inactive for 3 minutes
AND zone 1 is inactive
THEN ………

Hi @Wim_Post ,
yes, with only two triggers, your solution is more efficient. But in case you plan to add more devices, zones, or other triggers, it is easier to do it like the proposal from @PerJon.
And Per yes that is what I was thinking about. But I guess you nedd to add an ALL card before It isn’t between Dawn ( 0 ) and Dusk ( -30 ).
I am not sure, how Homey Pro acts on the flow without that card.

NEVER connect to inputs from an ALL on different triggers! That doesn’t work !

Both triggers are executed with Action Top Left and create Work#1 and Work#2 on the Timeline,
However the middle Action behind the ALL will NEVER be activated:

Thank you Dijker, but I did not propose to connect triggers with ALL, but AND conditions
What is wrong with this proposal? Well unless I would only turn off lights in the zones I checked, but just as enlightening example:

And what would happen if I do not use the ALL card but connect all And conditions directly with the turn off action?

As drawn here perfect,
maybe I interpreted your tip wrong. Guess I looked at the Edit @Wim_Post did and remove the ALL.

Your ANY makes from 4 different Triggers one “NEW” trigger so these 4 Conditions to an ALL will work.

But if you would have only placed this ALL there in the ̶o̶r̶i̶g̶i̶n̶a̶l̶ ̶S̶c̶r̶e̶e̶n̶s̶h̶o̶t̶ ̶ WIM_POST Screenshot it would NEVER trigger. :wink:

Yes you are right, I would have put it in the @PerJon screenshot. In @Wim_Post 's screenshot I would have add an ANY card, while I do not know, if it is necessary.

This one should work then. I’ll test it thoroughly next snowfall when out shoveling snow.


I think it would be better to have an AND between the conditional cards. You want both zones to be inactive.

Even with an additional AND, you may have an unwanted situation where one zone is inactive for 3m and the other zone is inactive for 10s.

If you really want lights off when both zones were inactive for 3m, there are several solutions for it.

Option 1: I’m not sure if it would make sense for your situation, but you could create a new zone and move both zones under it as subzones. Then you could replace the first 5 cards by just two.

Am I wrong when assuming that after the “any” card, this flow checks if both zones is inactive before going any further?

Am I wrong when assuming that after the “any” card, this flow checks if both zones is inactive before going any further?

Yes, your flow checks only if ONE of the zones is inactive for the full 3m and if ONE zone (possibly the same) is currently inactive.

The below flows are equivalent and check if both zones are inactive, but still do not guarantee that BOTH zones have been inactive for 3m.



A possible solution with sub zones: