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?
A flow with two trigger card combined with an ALL will never be started.
Please have a look at this FAQ topic:
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.
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.
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
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.