Global Variables - What am I doing wrong?


#1

I made a Global Variable with all my switches.
I basically want a piston that will notify me if Any switch is on for 5m.
I am missing a lot of options when I use the Variable vs Physical Device.

image

Basically like this:
image


#2

Instead of using a global variable (which probably isn’t the best tool for this since it’s ‘new’ value is only available to a piston on subsequent piston runs)… why not just have a simple piston that says

If ANY of (pick all applicable physical devices) switch stays on for 5 minutes
then notify my via PUSH, SMS, or whatever means you prefer

Would that work?


#3

I was going to do that but I have a few pistons that call all my switches or contact sensors. So when I add more devices in the future, I would just need to update the global values.


#4

You might be able to use TrendSetter to create those groups of devices. Then you can address them in your pistons as one device and add additional ones via the TrendSetter app.


#5

When you add the conditions to your if statement, choose Physical Device(s) rather than Variable in the blue box under What to compare. Your variable will appear near the bottom of the device list and once selected you can choose the switch attribute to get all of the conditions you would expect.


#6

Thank you. That fixed it.