Can't set global var to expression?


#1

Hi Guys-

I’m trying to set a global var to an expression. @people is a list of devices and I’d like to set an integer @peopleHome to count(@people).

I open the dialog to initialize the int @peopleHome, and I’m able to choose “expression” and then enter my expression, which evaluates properly in the preview, but when I save the var, it goes back to (not set).

Any ideas?


#2

The piston has to actually trigger (execute) for it to write to the global variable.
Did you try hitting the “Test” button?


#3

ah yeah that does it. I’ve figured out a better way to do what I want anyway, but that’s helpful to know.