# "all" statement doesn't work icw device capabilities and logica

**URL:** <https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940>\
**Category:** Questions & Help\
**Tags:** advancedflow\
**Created:** [December 15, 2023, 10:26am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940 "2023-12-15T10:26:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_van\_Zundert](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eric_van_zundert/32/79511_2.png) [@Eric\_van\_Zundert](https://community.homey.app/u/Eric_van_Zundert)\
**Post date:** [December 15, 2023, 10:26am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/1 "2023-12-15T10:26:21Z")

</div>

Hi,

I am a new user and I try to establish the following:  
At given time (now scheduled every 5 seconds to force a trigger, but when it works it will be every day at 20:00) I would like to validate or the powerplug is below 1.  
But as the powerplug could be different and sometimes below 1 I would like to validate as well or the powerplug is below 1 for at least 10 seconds.  
So, in summary, I would like to check 1 time per day or the power is below 1 for at least 10 seconds. I tried to combine this in a ‘all’ statement, but it doesn’t work. ‘All’ statement is never triggered. Could you please have a look what I do wrong?

 ![2023-12-15_10-54-19](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/c/9c27140de65796711977da5cadd9e271626036bb.jpeg)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [December 15, 2023, 11:15am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/2 "2023-12-15T11:15:05Z")

</div>

> [@Eric\_van\_Zundert](#):
>
> or

So “ANY” instead of “ALL”?

---

<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:** [December 15, 2023, 11:16am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/3 "2023-12-15T11:16:31Z")

</div>

> [@Eric\_van\_Zundert](#):
>
> Could you please have a look what I do wrong?

A flow with two trigger card combined with an _ **ALL** _ will never be started.  
Please have a look at this FAQ topic:

> [@\[FAQ\]\[Advanced Flow\] Infinite canvas. Infinite creativity](https://community.homey.app/t/faq-advanced-flow-infinite-canvas-infinite-creativity/65145):
>
> Something advanced is coming to Homey Pro… For the AMA [Advanced Flow — Ask Me Anything](https://community.homey.app/t/advanced-flow-ask-me-anything/65167) speech_balloon The FAQ from Athom is already on the information page on the bottom. The link should automagically switch to your language (en/nl / etc…) Read the introduction from Athom here: [Advanced Flow](https://homey.app/advanced-flow/) The EXTRA Things you can do in Advanced Flow Have multiple Triggers Have 1 (one) Start (Starting the Flow) Have Delays (0 -999 Seconds, 0-999 min.) All (function to wait for all incoming trigger…

Btw, to start a flow every 5 sec. is not a good practice. In addition, you are already using the correct trigger card from the Device Capabilitie app. This card alone is sufficient.  
The only thing what is missing, is a part which ensures, that the flow is just started once a day if I understand you correct.  
This can be done e.g. with a Yes/No variable. This state of variable, if it’s Yes or No, has to be checked as condition card after the trigger card. And if the condition (\< 1 W for at least 10 sec) has occurred for the first time during the day, the variable must be changed and reset it again at midnight.

---

<div class="post-metadata">

**Author:** ![Eric\_van\_Zundert](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eric_van_zundert/32/79511_2.png) [@Eric\_van\_Zundert](https://community.homey.app/u/Eric_van_Zundert)\
**Post date:** [December 15, 2023, 3:27pm UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/4 "2023-12-15T15:27:18Z")

</div>

Hi Fantross,

Thanks for the provided link. Very useful! Based on your remarks. I build below flow. Is this what you had in mind as well? Unit testing worked out as expected, except for the delay of the triggering. The requirement for 120 seconds is earlier met than 120 seconds. I guess due to the fact that the Device Dapabilites card is already ‘running’ before the logic ‘stromer’ is equal to ‘ja’. I guess the Capability ‘Huidig vermogen’ must start with zero before it starts. Not sure how to do this.

Eric.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/d/3dfae9ba9aeadc0cdb96ed70f8cc7f0c0f9cefea.jpeg)

---

<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:** [December 15, 2023, 11:50pm UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/5 "2023-12-15T23:50:26Z")

</div>

I think you first should change “voortdurend terwijl het waar is” (continuously while true), to “Eén keer terwijl het waar is” (Once while true).  
Because otherwise, the card keeps triggering every 120s as long as the value is below 1.  
Using "“Once while true” triggers one time after 120s as long as the value is below 1.  
It triggers again, when the value first gets higher than 1, and then, drops below 1 again during 120s.

> [@Eric\_van\_Zundert](#):
>
> I guess due to the fact that the Device Dapabilites card is already ‘running’ before the logic ‘stromer’ is equal to ‘ja’.

True.  
It should work better when you change the card like I just explained.  
But you can’t force it to run only at some time.  
I guess you have to use something like this:

When “Stromer” value is below 1 during 120s…  
And time is between 20:00 and 20:05  
Then add “[huidig vermogen] gelukt” to Simple Log

But you still could miss a trigger this way.

Maybe the DC app dev @Arie_J_Godschalk has an idea on how to let this card

 ![Screenshot_20231216-010302_Chrome](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/0/1/01f825cda2b87a768b376df78ac6256f9c549f37.jpeg)

only start measuring after, say, 20:00hrs, or only enable the card between 2 certain times, like, between 20:00hrs and 20:05hrs

---

<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:** [December 16, 2023, 8:42am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/6 "2023-12-16T08:42:10Z")

</div>

> [@Peter\_Kawa](#):
>
> Maybe the DC app dev @Arie_J_Godschalk has an idea on how to let this card

Well, the card is activated when created or when the flow is enabled.  
So you could disable the flow and enable it at 20u.

However, when this flowcard is enabled, it will check if the value is meeting the condition. If so, it will use the lastchanged value to start the timer.  
So if at 19u59 the value changes and it meets the condition, and you enable the flow at 20u, it will countdown 120seconds from 19u59.

---

<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:** [December 16, 2023, 2:14pm UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/7 "2023-12-16T14:14:05Z")

</div>

I get it, Arie. Thanks for looking into it.

---

<div class="post-metadata">

**Author:** ![Eric\_van\_Zundert](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eric_van_zundert/32/79511_2.png) [@Eric\_van\_Zundert](https://community.homey.app/u/Eric_van_Zundert)\
**Post date:** [December 17, 2023, 10:47am UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/8 "2023-12-17T10:47:52Z")

</div>

Hi, @robertklep, @DirkG, @Arie_J_Godschalk, @Peter_Kawa ,

Thank you all for analyzing my question and for your helpful response.

Eric.

---

<div class="post-metadata">

**Author:** ![Wout\_van\_den\_Dool](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/wout_van_den_dool/32/391_2.png) [@Wout\_van\_den\_Dool](https://community.homey.app/u/Wout_van_den_Dool)\
**Post date:** [May 21, 2024, 8:22pm UTC](https://community.homey.app/t/all-statement-doesnt-work-icw-device-capabilities-and-logica/97940/9 "2024-05-21T20:22:17Z")

</div>

Just out of interest. Is this for your stromer speedpedelec, if yes…what how did you automate your bike in Homey?
