Hi Martin, a little request, if possible.
When setting "Period timer" , field "Interval" accept only string value, but not variable.
Is it possible to make a change in order to use a variable in the "Interval" field?
This modification would make the same "Flow" usable by modifying the range of use simply by changing the variable value.
Thanks
Periodic Timer - Using variable
Moderator: Martin
Periodic Timer - Using variable
Xiaomi MI 6
Rom Miui 10 EU STABLE
Rom Miui 10 EU STABLE
Re: Periodic Timer - Using variable
I might need this some day, so +1.
Meanwhile, the other workaround for it is using Glovar datetime. Use a glovar datetime trigger and use a glovar for it. In each execution use
So every execution will add the current time to the interval you have, essentially making it to execute again after the interval. The downside is you need the extra glovar to store the time.
Meanwhile, the other workaround for it is using Glovar datetime. Use a glovar datetime trigger and use a glovar for it. In each execution use
Code: Select all
global_period_timer = getDate() + global_period_interval;
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Periodic Timer - Using variable
Thank you, waiting Martin answer, i'll use your way.
Xiaomi MI 6
Rom Miui 10 EU STABLE
Rom Miui 10 EU STABLE
Re: Periodic Timer - Using variable
Hi,
I recommend to use the method Desmanto mentioned. Supporting variables in triggers is on my todo list but has quite a low priority since I did not yet have a good general idea how it can be achieved in a way that does not lead to unexpected side effects and performance issues.
One option might be to consider the variables only at the time the trigger is registered but not afterwards so you would have to disable and enable the flow when the variable is modified. Would this be helpful to solve your case?
Regards,
Martin
I recommend to use the method Desmanto mentioned. Supporting variables in triggers is on my todo list but has quite a low priority since I did not yet have a good general idea how it can be achieved in a way that does not lead to unexpected side effects and performance issues.
One option might be to consider the variables only at the time the trigger is registered but not afterwards so you would have to disable and enable the flow when the variable is modified. Would this be helpful to solve your case?
Regards,
Martin
Re: Periodic Timer - Using variable
Thanks for the reply Martin
"Would it help to solve your case?"
No, it would not be useful, the variable could change and it would be a problem to deactivate and reactivate the flow.
I have tested the method Desmanto mentioned, it works well and not problems.
Ps Martin this is a great app !!!
"Would it help to solve your case?"
No, it would not be useful, the variable could change and it would be a problem to deactivate and reactivate the flow.
I have tested the method Desmanto mentioned, it works well and not problems.
Ps Martin this is a great app !!!
Xiaomi MI 6
Rom Miui 10 EU STABLE
Rom Miui 10 EU STABLE