# Difference between AND and ALL in advanced flows

**URL:** <https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [October 8, 2022, 8:52pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102 "2022-10-08T20:52:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 8, 2022, 8:52pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/1 "2022-10-08T20:52:10Z")

</div>

Hi all,

Can someone please explain the difference between using:

1. two conditions separated by AND

Logic A → AND → Logic B → THEN action

and

1. two conditions combined with an ALL

I am using the second option in an advanced flow and it doesn’t fire when both Logic A and Logic B are true

---

<div class="post-metadata">

**Author:** ![Jo\_San](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jo_san/32/3732_2.png) [@Jo\_San](https://community.homey.app/u/Jo_San)\
**Post date:** [October 8, 2022, 9:07pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/2 "2022-10-08T21:07:53Z")

</div>

If the all does not go through than either one of the cards before it is not true, or they are never activated (the path to such a card isn’t there, or at least not at the same time).  
But, without showing the flow, it would become a guessing party I’m afraid.

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [October 8, 2022, 9:24pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/3 "2022-10-08T21:24:59Z")

</div>

Please share a screenshot of your flow.

---

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 8, 2022, 9:25pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/4 "2022-10-08T21:25:31Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/4/54ed5948d24d7f3b3716bf27a1021b11a5790b75.png)

Yes, when both variables are “Yes”, the action following the ALL block does not fire. The flow is ENABLED

Is there a difference between the two constructs in my original post?

---

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 8, 2022, 9:28pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/5 "2022-10-08T21:28:42Z")

</div>

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/7/976b38b9edad716b7294066bd0c2fe068370433d.png)

I had imagined that when both the conditions were met, DOORBELL 2 would be activated. It isn’t

---

<div class="post-metadata">

**Author:** ![Jo\_San](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jo_san/32/3732_2.png) [@Jo\_San](https://community.homey.app/u/Jo_San)\
**Post date:** [October 8, 2022, 9:35pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/6 "2022-10-08T21:35:35Z")

</div>

You are using and cards as trigger cards, that does not work

---

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 8, 2022, 10:15pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/7 "2022-10-08T22:15:19Z")

</div>

Ah, I think I see. So I would need to change it to this?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/5/1541bd01bb6dff1744ebe2a25734f3aca8b0fc93.png)

---

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 8, 2022, 10:50pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/8 "2022-10-08T22:50:43Z")

</div>

Or would this work as the more elegant solution?

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/f/5fccf52fa2ced7ba34e46b4798d2104644e155cb.png)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [October 9, 2022, 2:51am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/9 "2022-10-09T02:51:39Z")

</div>

This still will not work, you need a trigger as start of any line.  
The image above, where you connect the If and And cards, that one looks good.

---

<div class="post-metadata">

**Author:** ![Jo\_San](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jo_san/32/3732_2.png) [@Jo\_San](https://community.homey.app/u/Jo_San)\
**Post date:** [October 9, 2022, 7:13am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/10 "2022-10-09T07:13:32Z")

</div>

This should work I think

---

<div class="post-metadata">

**Author:** ![Jo\_San](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jo_san/32/3732_2.png) [@Jo\_San](https://community.homey.app/u/Jo_San)\
**Post date:** [October 9, 2022, 7:14am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/11 "2022-10-09T07:14:10Z")

</div>

This won’t, as the AND cards do not get triggered.

---

<div class="post-metadata">

**Author:** ![Jo\_San](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jo_san/32/3732_2.png) [@Jo\_San](https://community.homey.app/u/Jo_San)\
**Post date:** [October 9, 2022, 7:15am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/12 "2022-10-09T07:15:01Z")

</div>

If you want to use the ALL card, you could connect the trigger to both AND cards.

---

<div class="post-metadata">

**Author:** ![Gary\_Lane](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/gary_lane/32/49965_2.png) [@Gary\_Lane](https://community.homey.app/u/Gary_Lane)\
**Post date:** [October 9, 2022, 7:37am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/13 "2022-10-09T07:37:58Z")

</div>

OK all, got it. Thanks so much for your help. It seems either the daisy-chained ANDs or this ALL block would work equally. Please just let me know if I’;ve got that wrong. This has ben a great education, thank you.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/7062e890b8ee42366ea7b131da11bdf2e01de4b0.png)

---

<div class="post-metadata">

**Author:** ![Brane\_Brodnik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/brane_brodnik/32/78912_2.png) [@Brane\_Brodnik](https://community.homey.app/u/Brane_Brodnik)\
**Post date:** [December 28, 2024, 5:06pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/14 "2024-12-28T17:06:20Z")

</div>

Why AND and ALL operators have no FALSE output like AND cards? It would add flexibility and simplicity in some sitautions.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [December 28, 2024, 10:19pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/15 "2024-12-28T22:19:42Z")

</div>

Because you need to use the FALSE of the card ypu connect ANY or AND to.

Besides, how would you use a FALSE on ANY if any-but-one of the cards are allowed to be false?

---

<div class="post-metadata">

**Author:** ![Brane\_Brodnik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/brane_brodnik/32/78912_2.png) [@Brane\_Brodnik](https://community.homey.app/u/Brane_Brodnik)\
**Post date:** [December 29, 2024, 5:23pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/16 "2024-12-29T17:23:08Z")

</div>

First, I meant ANY and ALL instead of AND and ALL, what I corrected in my original post.

For example, I wold resolve the following sitaution: If ALL windows are closed, THEN turn on the air condition ELSE notify me about open window.

Or with inverted logic: If ANY window is open, THEN notify me, ELSE turn on the air condition.

The same with alarm sistem, energy managment sistem and so on.

Regards,  
Brane

---

<div class="post-metadata">

**Author:** ![Mike1233](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mike1233/32/20991_2.png) [@Mike1233](https://community.homey.app/u/Mike1233)\
**Post date:** [December 29, 2024, 6:08pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/17 "2024-12-29T18:08:44Z")

</div>

Then you add an ANY card in the flow.  
If al the windows are closed, or “yes” then the blue lines go to the ALL.  
If a window is not closed, so no “yes”, the yellow line goes to ANY. And from ANY you send a notification.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [December 29, 2024, 6:19pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/18 "2024-12-29T18:19:23Z")

</div>

> [@Brane\_Brodnik](#):
>
> First, I meant AND and ALL instead of AND and ANY, what I corrected in my original post.

Nice, so now I look like a fool replying to something thats now not in your post ? 😉

Add an [edit] next time please (and what you edited) if it’s not just a typo.

---

<div class="post-metadata">

**Author:** ![JohanP](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/johanp/32/119002_2.png) [@JohanP](https://community.homey.app/u/JohanP)\
**Post date:** [December 29, 2024, 6:24pm UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/19 "2024-12-29T18:24:44Z")

</div>

> [@Brane\_Brodnik](#):
>
> I wold resolve the following sitaution: If ALL windows are closed, THEN turn on the air condition ELSE notify me about open window.
> 
> Or with inverted logic: If ANY window is open, THEN notify me, ELSE turn on the air condition.

Use 2 cards, if ALL windows closed turn on air  
If ANY windows open notify me…

Connect your WHEN/AND card(s) with both…

[Edit] the ALL to the true and the ANY to the false ofcourse…

---

<div class="post-metadata">

**Author:** ![Brane\_Brodnik](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/brane_brodnik/32/78912_2.png) [@Brane\_Brodnik](https://community.homey.app/u/Brane_Brodnik)\
**Post date:** [December 30, 2024, 6:30am UTC](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102/20 "2024-12-30T06:30:19Z")

</div>

> [@JohanP](#):
>
> Use 2 cards, if ALL windows closed turn on air  
> If ANY windows open notify me…
> 
> Connect your WHEN/AND card(s) with both…
> 
> [Edit] the ALL to the true and the ANY to the false ofcourse…

Yes, I know I can use two cards, even can I cope without any of them, but it’s about structuring and simplicity, which is what ANY and ALL are used for.

[Next page](https://community.homey.app/t/difference-between-and-and-all-in-advanced-flows/70102.md?page=2)
