I am building a ArrayAdapter for this precicly in HOOP.
@zakraket Glad 2 hear you discovered the magic yourself.
I also didnât get it at firstđ, but the THEN action card explains what do do
And how nice! The new testversion letâs you also calc trends live! No flows needed. Handy for troubleshooting
https://homey.app/nl-nl/app/ch.philippewechsler.trends/Insight-Trends/test/
Tag âAverageâ value:
Here r my 2 example flows:
As u can see, you can use calculated tag(s) for further use.
Or did you mean someting else to re-use the tagvalue with:
{âWhen you use calulate Trend in the AND section you canât use the outcome in the THEN
f.e. IF trigger AND calculate Trend average > 0 then set Var to Average
Outcome is not available as a tag, which might be a shame.â}
Yes, Iâve been playing with it for a few things now.
I have one flow that calculates several trends
IF every minute
ANDâŚ
THEN
calculate trend temperature
calculate trend humidity
calculate trend sunpower (from solarpanels)
etc
Now I can create separate flows for each calculated trigger
IF temperature trend calculated THEN f.e. put in var (for later use)
IF humidity trend calculated AND value<x THEN f.e. push to user
But I think the use of
IF trigger AND calculated Trend < value THEN something
is limiting since the AND calculated trend is not available later on. It would be better if it was put into a tag (but maybe thatâs just too difficult to build or whatever)
At least I now have real trendvalues to work with instead of values that go up and down and are not suitable for proper decisions.
In your example you donât need the Start Flow 2 in flow 1
So nice to hear this works for you!
Iâve created a logic NUM var:
With this flow I store the calculated value to the âInsights_Average_Savedâ var:
Outputted values:
Edit I see nowâ:laughing: Flow 2 gets triggered when the calculation has finished. Didnât get that at first
(Orig: While Iâm just testing, it seemed handy for me to start flow 2 with flow 1, and then get my calculated value as in âreal lifeâ)
Very very interesting Arie. I never got it why flows canât be set up Macrodroid-wise, but u r going the right direction with H.O.O.P.
Thanks, almost ready for release to HCS. Its been tested and fixed, and allready has more then i currently have written on the topics.
yes, but it requires an extra flow. I have also set it up this way. But never mind, at least it works!
Btw whatâs this screenshot? Is this the app? I donât have this
As I wrote: The new testversion (of the app) letâs you also calc trends live, no flows needed. Handy for troubleshooting.
Go to More>Apps>Insights Trends and hit âConfigure appâ
Link to testversion:
https://homey.app/nl-nl/app/ch.philippewechsler.trends/Insight-Trends/test/
Sorry, missed this between the screenshots , tnx
I wasnât gonna call you names, yet
How did you figure out the day in order to put the day name in a variable?
Iâm not sure to what youâre referring to. Can you quote that pls?
How did you calculate which day it is in order to put the name of the day in that text variable?
While I was curious, and like to find out things, I came up with this.
It should run until Homey dies.
Maybe I missed something, or things can be done in other ways, pls let me know!
How to display (or to use with speech) name of today and this month
A. Create 2 variables, type Text
- NaamVanDag (name of day), no text need to be entered.
- NaamVanMaand (name of month) & enter the name of the current Month
B. Create 7 flows, one for each weekday
Mon:
Tue:
Wed:
And so forth
C. Create 12 flows, one for each month
Jan:
Feb:
Mar:
And so forth
some/most can be done in HomeyScript:
//MyCreateDay-Tag.js
let SysInfo = await Homey.system.getInfo();
var weekDay = SysInfo.dateHuman.slice(0,(SysInfo.dateHuman.indexOf(' ')));
await tag("WeekDay", weekDay ); //creating new HomeyScriptTag 'WeekDay'
console.log("Weekdag", weekDay);
return(true);
Thanks! I donât have enough knowledge to write a script like that.
Most of the time I can read what a script should do.
So if Iâm correct this script creates tag named Weekday and then this script updates the value of it with the name of the weekday.
Does it create the same tag each day? Or is this skipped if it already exists?
But, well, this saves a lot of flows
This script runs ones when called, so it has to be run every day.(can be run in the AND column)
HomeyScript is fun to experiment with, just try, Iâm also a beginner but many guys here can assist you, when you get stucked. There are many examples provided with HomeyScript, play with them and be amazed.
Thanks, yes I understood, and alr created a flow for that Playing with the script examples right now.
So ofcourse I want the month tag also, but, no way it returns something else but weekday
Inside the Playground
Homey.system.getInfo();
returns
"dateHuman": string "donderdag 29ste april 2021 17:31:41"
I canât even let the homeyscript return that, and I want to pick the 3rd word of the string in some way I was thinking.