Can a device name be a variable?

I want to set up a rule that executes a number of tasks against a device. In this case, a camera moving to preset A, preset B, etc. to preset F.

I’d like to use the same rule, but have a variable take the place of a device name.

I’d either like it to stop and prompt me for the device name, of I can set up a seperate time to set the variable to the device name I want, and then execute the other rule.

Can I do that? I can’t seem to figure out via the interface that when I go to select the device name, to have it replaced with the variable I created.

Any thoughts?

1 Like

@Paul_Wilson_Hillman, you can create a Number or Text variable and add it to the dashboard to allow you to tap and input. Then create a rule with if conditions in the flow to check this variable’s value and determine which device you want to send the command to. We don’t support dynamically assigning the device via variable at this point, so you will have to use multiple IF blocks to achieve this.

1 Like

Hi @James,

Has there been any update 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 the device for any reason in SmartThings, I 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.

Hi @Randal_Bartsch - welcome to the community and thanks for posting.

This is a regular community post. Feature Requests are tracked in the Feature Request category which has the proper tools for tracking the level of community interest.

I believe the folllowing request covers what you need if you want to cast a vote and perhaps reply to bump the thread:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.