Help referencing device attribution from device array


#1

I’m having a hard time referencing a device’s attributes (capability) when using a device list.

here is the code, bolded underline is what I would like to define

device humidifierList = Bedroom Humidifier and Downstairs Humidifier

foreach ($device in {humidifierLlist})
do
if ($device:humidity is outside of range (targetHumidity - hysteresisValue) and targetHumidity)

thanks!


#2

Use

[$device : humidity]

to retrieve the humidity for a device. Put that in an expression field


#3

excellent, thanks!