Need help to convert a piston from multiple devices to single


#1

I’m playing around with the tiles pistons (thanks @bfara83 :wink: ), and need some help to convert one of them from operating on a collection of devices to just a single device.

Here is the current piston:

I have just one switch and switch name in the arrays; I would like to convert it to work on that single device, in the interest of testing performance… but I’m not proficient enough at webCoRE’s syntax yet to breeze through it and keep hitting stumbling blocks.

Any takers? :smiley:


#2

My advice would be to make a Virtual Switch and add it to the Array rather than re-writing the entire thing to only work on one device.


#3

Is it messing up by only having one switch? This should be scalable


#4

No, it works fine. (First seven tiles at upper left in the screen grab below.)

Originally I wanted to do it so I could set individual colors for the icons in each switch while leaving the tile text the same, but I figured out how to do it programatically with the one piston. Now I’m just curious and wanting to do some testing on performance to see how much faster it would run if it was coded for a single device, rather than a collection of devices…everything else remaining the same.

I’m wondering which is worse: the overhead of another piston, or the overhead of working on all those collections of properties.