This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Flows
How do I use an AND/OR condition combined with a specific period?
Jon
Member
Hey guys. I need your help!
Suppose I'd like to let my sun screen move up if a certain condition (e.g. "wind gusts are too high") are lasting for a certain period, for example 20 minutes or longer.
My current Weather Underground sample rate is every 10 minutes, so the sun screen then needs to go up when at least 2 samples are above the treshold value of (in my case) 40.
The way it's implement now (see screenshot below, under the first 'OR' condition) is moving my sun screen up too frequently...
What is the smartest way to implement this?
Basically it comes down to this: run flow A only when condition B is met at least X times.
Suppose I'd like to let my sun screen move up if a certain condition (e.g. "wind gusts are too high") are lasting for a certain period, for example 20 minutes or longer.
My current Weather Underground sample rate is every 10 minutes, so the sun screen then needs to go up when at least 2 samples are above the treshold value of (in my case) 40.
The way it's implement now (see screenshot below, under the first 'OR' condition) is moving my sun screen up too frequently...
What is the smartest way to implement this?
Basically it comes down to this: run flow A only when condition B is met at least X times.
Tagged:
Comments
flow 1: IF very 15 minutes > AND windstoten is higher then 40 + Sunscreen is open > THEN increment number variable "windstoten".
flow 2: IF number variable "windstoten" changed > AND number variable " windstoten" is 2 > THEN close sunscreen and set number variable "windstoten" to 0
Otherwise it could happen that the number variable is already at 1 when the screens are opened.
Hoped to have an even smarter solution therefore!
I would use a local windmeter like a Netatmo windmeter or something simular to record that. That's probadly way more accurate to record your local situation. Destroying your windscreens within 15 minutes as a thunderstorms comes up, is way more expensive.
I would not start the flow every 15 minutes, but only if the windspeed is picking up.
Maybe you could also using the 'countdown' app to start a counter if the windgusts are to high. And using a logical variable to count the number of gusts within a period of time, and let the result of the variable trigger your flow.
Why not using a countdown timer if the windspeed is above a limit and ad +1 to a variable, and then reset your timer, if the windspeed drops again. If the variable reaches a certain number start your flow to raise the screens. If the counter reaches zero ( the windspeed is still to high and will not drop) raise your screens.