# How exactly does the "all" block working?

**URL:** <https://community.homey.app/t/how-exactly-does-the-all-block-working/74644>\
**Category:** Flows\
**Tags:** flow\
**Created:** [January 5, 2023, 6:15pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644 "2023-01-05T18:15:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![onkelperi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/onkelperi/32/19571_2.png) [@onkelperi](https://community.homey.app/u/onkelperi)\
**Post date:** [January 5, 2023, 6:15pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/1 "2023-01-05T18:15:57Z")

</div>

I’d like to better understand the function of the “all” block. I know that the block is only continuing when all input signals are set but how long does it wait?

Example:  
I’ve a Hue dimmer switch and generate two events, one with the on-button and one with the off-button. Now I connect thes two events to the “all” block and publish a logentry. My expectation was, that if I press the first button, nothing happens but as soon as I press the second, the logentry is done. But this is not the case. Hence I’m wondering how this “all” bock is implemented.

 ![Example_all_block](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/b/cb5c345d51449e48cd513a8fdfe6e077cf7442cc.png)

---

<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:** [January 5, 2023, 6:30pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/2 "2023-01-05T18:30:00Z")

</div>

described here:

> [@\[FAQ\]\[Advanced Flow\] Infinite canvas. Infinite creativity](https://community.homey.app/t/faq-advanced-flow-infinite-canvas-infinite-creativity/65145/1):
>
> **Two triggers to start an ALL**  
> Also applies to all other different **triggers** b̶e̶h̶i̶n̶d̶ before an ALL like “Someone came Home” AND “the door is opened” =\> That is NOT going to trigger NEVER!
> 
> ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/7/07b8f61c91489578e20195bfa91712a476494fa6.png)
> 
> ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/c/5ce7fe8ecf7cbaa4b6e5f3c4a233fd2cb7aed23a.png)
> 
> That only works with an ANY function!
> 
> ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/2/420567c7468661153418eba849205bc8fcac2410.png)

---

<div class="post-metadata">

**Author:** ![onkelperi](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/onkelperi/32/19571_2.png) [@onkelperi](https://community.homey.app/u/onkelperi)\
**Post date:** [January 5, 2023, 6:40pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/3 "2023-01-05T18:40:25Z")

</div>

Thank you very much @Dijker , that helps a lot.

---

<div class="post-metadata">

**Author:** ![Krzysiek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/krzysiek/32/34025_2.png) [@Krzysiek](https://community.homey.app/u/Krzysiek)\
**Post date:** [January 27, 2023, 9:47pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/4 "2023-01-27T21:47:45Z")

</div>

@Dijker so does the “ALL” block only start when all conditions are met in a given moment or in other words when the flow is triggered? Do I understand it correctly that it will never wait and ‘collect’ triggers from different cards?

How do I build a flow then where I would like it to trigger an event once a month (but not on the same day of the month, I mean every 31 days) at 8:00? When I thought that the “ALL” block would wait for both triggers, it seemed like a nice solution but that does not work.  
If I use “ANY” it will trigger every day at 8:00 and also every 31 days. I suppose I could use logic to combine both but that seems a bit complicated for a simple flow.

Thank you!

---

<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:** [January 27, 2023, 10:25pm UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/5 "2023-01-27T22:25:01Z")

</div>

> [@Krzysiek](#):
>
> When I thought that the “ALL” block would wait for both triggers

No it waits for all lines from ONE trigger …

And “Every 31 Days” starts over every month, like very 3 days triggers if I remember on Day 1 , 4, 7, 10, …  
of each month. and every 4 days on day 1, 5, 9, 13, 17 …?

Tested for you a Every 31 Days in ~ 62 seconds. it flips over nice…

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/c/3cc4c37dd336cb9faa78ddd7e8a40c70fc9953b3.png)  
Just remove the every 2 seconds trigger and trust the it is 8:00 (Every Day) and the counter…

---

<div class="post-metadata">

**Author:** ![Krzysiek](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/krzysiek/32/34025_2.png) [@Krzysiek](https://community.homey.app/u/Krzysiek)\
**Post date:** [January 28, 2023, 11:10am UTC](https://community.homey.app/t/how-exactly-does-the-all-block-working/74644/6 "2023-01-28T11:10:30Z")

</div>

Thank you! Very interesting, I never used a counter like that but I am not a very advanced user.

If you would be so kind, could you please have a look and let me know if I understand it correctly?  
The way I understand it is that every day at 8:00 the logic will check if the count is less than 31. If yes, +1 will be added to the total count. If no, meaning the count is 31, the counter will be set to 0 which means that 31 days has passed and that can trigger my event (every 31 days). Here I added a notification as an example.

 ![Screenshot 2023-01-28 at 11.23.07](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/e/ce745fb7be07c4829f337491b9efd351c609e4ce.jpeg)
