I am trying to loop through multiple peripheral devices in a workflow to determine if an attribute has changed, and if so, issue a command to the controller device. The problem is that the devices are not static.
I have one device (type Controller) that contains the number of peripheral devices as an attribute (nAreas) which I can acquire using a Gauge Query on the controller device. All of the Area devices use a common tag (deviceType) set to “Area” so I can get device information for each of the Area type devices using a Gauge Query specifying the tag deviceType=“Area”, and the array is added to the payload. So far so good.
But now I want to loop through each Area device, get it’s attribute “level” and see if it’s changed. And if so, issue a command to the device.
Any advice on how to handle looping like this in a workflow?