# Reevaluate IF after 10 mins

**URL:** <https://community.homey.app/t/reevaluate-if-after-10-mins/111061>\
**Category:** Flows\
**Tags:** advancedflow\
**Created:** [June 5, 2024, 9:05am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061 "2024-06-05T09:05:12Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimVW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timvw/32/79069_2.png) [@TimVW](https://community.homey.app/u/TimVW)\
**Post date:** [June 5, 2024, 9:05am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/1 "2024-06-05T09:05:12Z")

</div>

Hi,

I 'm new to the advanced flows and have soms questions…

I want to start charging my EV when I have -1500 Watt power because of my solar panels.

The first part of the flow works: charing starts when power -1500 Watt (Homewizard P1 meter).

In the second part of the flow I want a 10 min counter to be started when the power goes +4000 Watt.  
After the 10 min counter is done I want to reevaluate if I still use more than 4000 Watt.  
If yes =\> stop charging  
If not =\> continue charging and start the counter again to check de consumption after 10 min, and so on…

I tryed to make an advanced flow but I’m stuck 🙂  
I need a solution for the red arrows so I can start to evaluate the next part of the flow.

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

Hope you can help me out 🙂

regards,  
Tim

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [June 5, 2024, 9:36am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/2 "2024-06-05T09:36:15Z")

</div>

Hi Tim,

Advanced flows is a great choice.  
You are almost there.

1. Note: Zandloper needs to be in seconds. I prefer to use Chronograph which is more flexible and can help you much better in reporting remaining times/durations.

2. The first red arrow needs no addition.

3. The second red arrow:  
IF trigger: Zandloper is finished  
AND: huidig vermogen \> 4000 (use logic cards if P1 does not have AND cards)  
THEN: Stop laadsessie

4. Remember that you are here taking a “photo” in a point in time. If Huidig Vermogen is varying a lot, you may need to calculate the average over the past 10 minutes instead.

5. Early stop: If Huidig Vermogen is not varying a lot, then you can stop the timer earlier:  
IF: Huidig Vermogen less than 3900W  
AND: zandloper actief  
THEN: Stop zandloper

---

<div class="post-metadata">

**Author:** ![TimVW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timvw/32/79069_2.png) [@TimVW](https://community.homey.app/u/TimVW)\
**Post date:** [June 5, 2024, 10:52am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/3 "2024-06-05T10:52:14Z")

</div>

Hi Rrrrr,

Thanks for the help!

The main problem indeed was the fact that P1 does not have AND cards. Solved with the use of logic cards.

I still have 1 question:

I want that if the timer is finished and power is \< 4000 Watt a new timer starts to reevaluate the logic again after 10mins. I want to let the flow to chek this every 10mins, infinite.  
So IF power \< 4000 =\> start new timer and check power after 10 min, than again the same check after 10 mins and so on.  
IF power \> 4000 =\> stop charging (that part already works).

regards,  
Tim

---

<div class="post-metadata">

**Author:** ![TimVW](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/timvw/32/79069_2.png) [@TimVW](https://community.homey.app/u/TimVW)\
**Post date:** [June 5, 2024, 11:18am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/4 "2024-06-05T11:18:06Z")

</div>

![2024-06-05 13_17_10-Homey Pro van Tim](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/4/44484b8db7e805ee0082d3e0c7b7d3aa253940c7.png)

Or is this the only way to go: timer after timer after time…?

---

<div class="post-metadata">

**Author:** ![Andy\_Henderson](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/andy_henderson/32/80642_2.png) [@Andy\_Henderson](https://community.homey.app/u/Andy_Henderson)\
**Post date:** [June 5, 2024, 11:59am UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/5 "2024-06-05T11:59:11Z")

</div>

Perhaps think laterally and execute a flow whenever the power level changes? You could use a variable to record the state of the flow if necessary.

Andy

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [June 5, 2024, 1:41pm UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/6 "2024-06-05T13:41:23Z")

</div>

> [@TimVW](#):
>
> I want that if the timer is finished and power is \< 4000 Watt a new timer starts to reevaluate the logic again

You described the trigger already: it is Huidig Vermogen.

- So you can avoid starting a new timer after ending the first timer.
- Better not use the exact comparison: equals 4000W is unlikely to help you much here as it will hardly ever be exactly 4000W. It will either be higher or lower.
- You can add multiple triggers:

IF Huidig Vermogen \> 4000 THEN start timer1.  
IF Huidig Vermogen \< 4000 (or 3900) THEN start timer1.  
IF Huidig Vermogen \< 3000 THEN start timer1.

But can you tell me why you want to keep checking? Do you want to restart charging? Your first flow takes care of that.

> [@Andy\_Henderson](#):
>
> execute a flow whenever the power level changes

That can be a solution for some, but risky in terms of needlessly running flows, especially when power level changes often (I guess P1 is local so there can be an almost realtime connection with power fluctuations)

One addition:  
If your Huidig Vermogen fluctuates around 4000 then you should start timer1 only if timer1 is not already running. There is an AND card for that.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [June 5, 2024, 2:22pm UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/7 "2024-06-05T14:22:04Z")

</div>

How about this.  
Note: Once started, it wont stop until the tank is full (as long as the past 10 minute average power is \<4000W) or the charger/owner stops it.

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

---

<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:** [June 5, 2024, 6:16pm UTC](https://community.homey.app/t/reevaluate-if-after-10-mins/111061/8 "2024-06-05T18:16:26Z")

</div>

> [@TimVW](#):
>
> the fact that P1 does not have AND cards.

Few apps have AND cards. You’re supposed to use logic cards for it, while every app’s values are available in tags, which you can use in logic cards.

> **[Using Homey Logic in Flows](https://support.homey.app/hc/en-us/articles/4410240765586-Using-Homey-Logic-in-Flows)**
>
> You’ve probably seen Homey Logic. Once you get the hang of it, it's a great tool for any smart home. By creating your own Variables and using these in your Flows as Tags, you can often accomplish c...
