Is it possible to access a device by ID?
For example, I have subscribed to the device with
subscribe(theDevice, attrName, stateChange)
I then get the event, and know the device ID from
def deviceID = evt.deviceId
What I now wish to do (among other things) is unsubscribe from the device because it has changed. How can I use the device ID to unsubscribe - I don’t want to loop through every device, and see if it matches the deviceID and then unsubscribe - there must be a more efficient way.