Homey Community Forum

Including a 'case' or 'switch' statement in flows to evaluate more than two conditions

Hi,

I am still struggling with the situation that I have to evaluate three different conditions in one Flow.

Although I am quite experienced in JScript I’d rather fix this in Flows. This way people who are not so confident with JScript will be able to test more than one condition too, thus creating more advanced flows.

Any suggestions anybody?

(ps. also a request to Athom to incorporate this in future development!)

Can u give an example ?
Because with the OR function u can test 3 alr.
Hit the AND card, hold it for a second and then drag it down. The OR card appears.
chrome_2020-12-13_12-33-51

For that you can make a feature request, Athom isn’t present in the community forum.

thanks

I know, but then “within” the OR-condition I need to test multiple situations (AND function).
Besides that I am probably going to need more conditions to test than three …

Thanks for your reply though …

U can add as many cards as u like within the OR function?

For that u need to make a request. They don’t tell us how many peeps requested this alr but there has been a lot of them me guess, good luck on that one.

Why don’t you give an example? With multiple flows it is also possible to check more than 3 conditions or 3 groups of conditions.

That’s what I did until now. But ‘maintenance’ is a bit more complicated then …
I’ll show you the flowchart … and then there is even a third condition that switches the “nightynight” variable, triggering another set of actions to be performed …

Sorry, but don’t understand exactly what is what.
Is „Lights changed?“ a variable?

If „Lights“ is a variable, the flows should look like this.
However, I think that the flow chart is generally wrong or not logical built. For example, the variable “Lights” is checked twice. The yellow colored diamonds are therefore unnecessary.

When…
Variable „Lights“ changed
And…
Variable “Lights = false” = Yes
Variable “NightyNight = off” = Yes
Someone at home = Yes
Then…
Lamp 1 off
Lamp 2 off

When…
Variable “Lights” changed
And…
Variable “Lights = true” = Yes
Variable “NightyNight = off” = Yes
Then…
Lamp 1 on
Lamp 2 on

In the first flow you can make desisions for 1 case, with the Else, you can jump to the next flow to flter the second case and so on. (No it’s not possible in 1 flow but who cares?)