How-to make flow for Somfy sunscreen more efficient?

I have a working flow which controls my Somfy sunscreen. I want Homey to lower the screen if certain variables have specific values. Unfortunately it’s not possible to use a specific timeframe for the IF variable. Therefore I used IF Each 5 minutes AND specific timeframe and other variables. The disadvantage of this flow is that Homey starts the flow each 5 minutes when all other variables have the right value. Although this works it just feels a bit inefficient. Homey is starting flows which already have started. Is there a more efficient way to make this work?

The flow as it is right now:

Each 5 minutes

Time between 16:00 en 21:00
Clouds not more than 75%
Wind not more than 20 km/u
Not raining in 5 minutes

Sunscreen 100%

If I could only enter a timeframe at IF, I would not have to use the Every 5 minute variable.

You can use the SETS app.
With that you can create a SET ie. “Somfy”, then create STATES for each of the variables you want to activate when the condition is met. ie “Clouds75%”, “Wind<20kmh” etc.

You then create a flow for each variable so, if Clouds is less than 75%, activate state in that set, else deactivate state…

Then create another flow when all state is activated (or deactivated) at execute your somfy device…

Thanks, it will solve my issue but it is an extremely overcomplicated solution for such a simple problem. I guess it is necessary to make 2 flows per state. One to activate and one to deactivate?

You could use one flow to deactivate if the conditions used is straight forward, ie if >75% activate state, else deactivate…

It may seem complicated but useful when you use it across a few other flows. For me my lights and ventilation is also dependent on this “sets” so I reference other flows to the sets. It’s easier to just change the conditions for activating and deactivating the sets then having to adjust every other flows that need to reference the conditions if they were intergrated into the respective flows…

True! Do you know how many times Homey checks the conditions?

Only on what you set as a trigger in your “IF” column.
For me, I poll my weather every 15mins which is then trigger my sets.
My set will only trigger if all states are activated or none is activated so those only fire when conditions are met.
The rest that check the set triggers on my motion sensor…