diff --git a/lib/extension/deviceReport.js b/lib/extension/deviceReport.js index 26cf764fe..24a286a57 100644 --- a/lib/extension/deviceReport.js +++ b/lib/extension/deviceReport.js @@ -48,12 +48,15 @@ class DeviceReport { } logger.debug(`Setting up reporting for ${device.ieeeAddr}`); - Object.values(endpoint.clusters).filter((c) => c).forEach((c) => { const cluster = c.attrs.cid; if (candidates[cluster]) { const candidate = candidates[cluster]; - const attributeNames = candidate.attrs.filter((a) => c.attrs.hasOwnProperty(a)); + let attributeNames = candidate.attrs.filter((a) => c.attrs.hasOwnProperty(a)); + + // Sometimes a cluster has no attributes, in this case setup reporting for all attributes. + attributeNames = attributeNames.length ? attributeNames : candidate.attrs; + const attributes = attributeNames.map((attribute) => { return { attr: attribute,