Moving a device from a space to another does not automatically move the attached sensors
I recently moved a device from one spaceId to another via API call from Postman. To my surprise, the sensors attached to that device were still assigned to the previous spaceId. But, in the Azure Digital Twins Graph Viewer, they were properly displayed. Is this a bug in the API or is it a desired behaviour?
Matthijs van der Veer commented
The Graph Viewer seems to show sensors as children of a device even if the sensor lives in a different space. I noticed the same because in my case I have sensors living in different spaces than the device. This doesn't solve your issue, but I wanted to pitch in just because in my case I wouldn't want the sensors to automatically move with a device.