deconz-rest-plugin
deconz-rest-plugin copied to clipboard
Fix potentially jumpy reachable state for sensors
When a sensor has a cluster in its fingerprint, which doesn't exist under the sensor's endpoint, function checkSensorNodeReachable() will set the respective sensor unreachable, as it checks for existence of all clusters.
While it makes sense to add those non-existent clusters to leverage some advantages on the legacy code, it apparently impacts the overall sensor status (falsely). To resolve this, the last check in the function to check for all clusters has been made lazy to just find one fit and then move on.
It's more unlikely this will occur on DDF supported devices, but can happen there as well (especially if the device is not newly paired). Eventually, this cluster check can be removed completely, as it seems to be a too tight precaution.