diff --git a/lib/extension/deviceReport.js b/lib/extension/deviceReport.js index a538a9f62..c310c0b67 100644 --- a/lib/extension/deviceReport.js +++ b/lib/extension/deviceReport.js @@ -58,8 +58,10 @@ class DeviceReport { const mappedDevice = zigbeeShepherdConverters.findByZigbeeModel(device.modelId); if (mappedDevice && mappedDevice.report) { - const endpoint = (typeof(mappedDevice.report)=='number')?this.zigbee.getEndpoint(device.ieeeAddr, mappedDevice.report):this.zigbee.getEndpoint(device.ieeeAddr); - this.setupReporting(endpoint); + const endpoint = (typeof(mappedDevice.report)=='number')? + this.zigbee.getEndpoint(device.ieeeAddr, mappedDevice.report): + this.zigbee.getEndpoint(device.ieeeAddr); + this.setupReporting(endpoint); } }); } @@ -76,7 +78,9 @@ class DeviceReport { if (device && mappedDevice && (message.type=='endDeviceAnnce' || message.type=='devIncoming') && mappedDevice.report) { - const endpoint = (typeof(mappedDevice.report)=='number')?this.zigbee.getEndpoint(device.ieeeAddr, mappedDevice.report):this.zigbee.getEndpoint(device.ieeeAddr); + const endpoint = (typeof(mappedDevice.report)=='number')? + this.zigbee.getEndpoint(device.ieeeAddr, mappedDevice.report): + this.zigbee.getEndpoint(device.ieeeAddr); if (endpoint) { this.setupReporting(endpoint); } diff --git a/lib/zigbee.js b/lib/zigbee.js index 73db04b76..aa244802a 100644 --- a/lib/zigbee.js +++ b/lib/zigbee.js @@ -321,7 +321,7 @@ class Zigbee { */ report(ep, cluster, attributes) { const cfgArr = []; - for(let i=0; i