Flows with exit status or functional blocks

Is there any way to create functional blocks of code for use in flows?

I have the following block already:

I’m going to add four more of these sensors to turn my airconditioner on/off, which will make it even worse. For some of them, I can create a group, but for the ones I need more advanced testing (like for my bedroom - if the window is open, but the door is closed, the aircon can run / if the window is closed, but the door is open, the aircon can run / if both of them are open, the aircon can not run). I’m also going to create other zones with more than one “layer” to test.

And this function block is going to be reused for other functions as well - both for aircon, floor heating etc.

So…would it be possible for me to collect these in some way? Is it possible to test for exit status? Is it possible to call another flow with the name of a variable to modify (I cannot use a set variable in the flow, as I won’t be able to control parallell execution)? Any other way (except for scripting)?

Thanks!

Use Advanced Triggers app to create a “function” to group units.
This flow can return state/status.

Thanks! Will try that tomorrow :slight_smile: