RE - Store Multiple Device References in a Variable

The ability to store device names in a variable, filtered by a condition (i.e. offline) would allow for notifications pertaining to devices that have a particular status. I’m presently doing this in webCore (soon to be deprecated in SmartThings) to check on a daily basis for offline devices and send a notification.

This is an example in webCore of what I’m looking to do in the Rule Engine,

@josh best summed up the concept in this post.

This webcore example of saving matching devices to a string variable is exactly what I am wanting to do.

I have a rule built with 10 doors/windows as triggers and then IF any is open, set variable to context.event.deviceName

The issue is that more than 1 door/window may be open at a time and I’d like a list of all open doors/windows, not just the most recent.

4 Likes

Related to this feature request, it would be nice to create a global variable and equate it to a device, and then use the variable in rules in place of the device. I do this in WebCoRE today.

The reason is that when I recreate a device for any reason in SmartThings, I would only have to edit one place in SharpTools if the device is referenced in many rules.

This feature would influence me to upgrade to Premium.

I am looking to do exactly what Bry, Randal and Terry mentioned above. I am trying to replicate a rule in Webcore where if my thermostat moves from idle, and any contact sensors are open (doors and windows), the appropriate contact sensor name (s) are loaded into a variable and then I would be notified of the open contact sensors. Right now its partially working in SharpTools except for the notification; it only reports the triggering device name (the thermostat)

1 Like

I have a similar use case I would like this to be available for. Upon location mode changing to Away or Night, I check all door and window sensors. If any are open, I’d like to get a message with the full list.