Array of devices - using device attribute in a condition


#1


I have an array of different devices. I want to know if the Computer Room Light is on. I have tried all sorts of syntax to use that device in a condition but I keep getting an error. The example shown is missing the ] so that I can include the screen capture here.

I can make this work by assigning arrayItem(0, Device_List) to a variable and then using that variable in the condition. Is there syntax that I am missing that will allow me to avoid the use of a variable?

Extra credit : Is there a way to create a 3X3 array of devices?


#2

Something like this?

image

And I turned on one of the switches… just to make sure :smiley:
image