It would be nice to be able to assign devices to a variable using an API call (i.e. https://api.smartthings.com/v1/devices?capability=battery)
then use devicelist = $device.items.label which produces this result
Now when I try to create a device it does this
There has to be an easier way to load devices into a device variable so you can select specific devices dynamically to a Global Variable and can run nightly to pickup any new devices so you do not have to add them manually to all your pistons. If you had 50 pistons you would have to add a new device to every one of them
If there is a way to do this already please let me know -