Loop to check switches

I am looking for to create a piston which checks my harmony hub switches to see which is on and turn it off when I am leaving home but I tried several things in Webcore but am not seeing how it works.

I tried the loops after I defined the variable, but even the variable does seem to look right and when I create the Foreach loop, I am not able to check if the switch is on.

The simple solution for me would be to check each switch individually but the script would be messy and I would have learned nothing.

Can anyone help?

You may get a quicker answer by asking in the WebCoRE community.

Aah that easy, that simplifies things a lot for me.

Thanks Robin.

1 Like