Merging insights after re-adding a device

Hi!

My Xiomi Light Sensor’s battery died. After re-inserting the battery, the device did not become active (I probably did not wait long enough to give it a chance to start reporting). I thought that maybe re-adding it to Homey, without removing it first, will help but in the process I think that I reset the device. In the end, I removed the device from Homey and re-added it. That of course caused the insights data to be removed. Is there any way to make Homey see the re-added sensor as the old sensor? It is the same device but it was removed and re-added. Would restoring Homey from a backup help for example? Or is there maybe some other way?

Internally, Homey works with device objects that represent a hardware device. The device objects have a unique id that gets assigned when creating the new device (for instance during pairing).

If you remove a device object (aka removing a device from Homey), any Insights data related to it will also be removed. If you create a new device object by pairing the same hardware device again, the device object will get a new unique id and therefore its own Insights.

When you re-add a device without first removing it, Insights will be reused because the same device object will be used.

Restoring a backup should bring your device back, although if may depend on whether or not you also reset the hardware device.

1 Like

That makes sense, thank you. I believe I reset the device. It is ok, it is just a light sensor from Aqara but it is good to know in case I have a similar issue.
The strange thing now is that the light sensor stopped reporting lux values all together. I tried resetting it again and re-adding it but it did not help so far.