Webcore Returning Count of 1 for Empty Device List

I have a piston that behaves differently based on the number of devices stored in a device variable. It wasn't behaving as expected so I made a "dummy" piston to run some experiments on the logic.

Turns out, the issue is a clear variable (or one set to 'nothing selected' or "") all result in a count of 1. I've tried everything I can think of to get this to work, but keep coming up blank. Appreciate any help (or other thoughts)

The images below behaves as expected when one or more devices are stored to it:

But when there aren't devices stored, the results become... unusable to base logic upon...


Using a piston to set to "nothing selected" has some different appearance, but same end results:

What about isEmpty()?


Works like a champ! I had no idea that function even existed to try it... thanks!!

also interested in what size() would give you.

Of course... then I try it in my actual piston and it fails. Any idea what could be the issue here? Same Device variable as the other piston, and set to the same value... :thinking:


It was the same as length()... 24 when empty in my dummy piston, but in my real one (that now has an error when trying "isEmpty()" shown above, size() returns a 0. Color me confused...

Here's the whole piston. I forgot if you post the piston in a message with multiple images, it doesn't zoom in when you click on it... it goes to the next image instead.