fix lint errors

This commit is contained in:
jbn
2019-02-26 19:33:32 +01:00
committed by Koen Kanters
parent 09e0fe8e3f
commit b8f689fe6e
2 changed files with 8 additions and 4 deletions
+7 -3
View File
@@ -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);
}
+1 -1
View File
@@ -321,7 +321,7 @@ class Zigbee {
*/
report(ep, cluster, attributes) {
const cfgArr = [];
for(let i=0; i<attributes.length; i++) {
for (let i=0; i<attributes.length; i++) {
const attribute = attributes[i];
const attrId = zclId.attr(cluster, attribute.attr).value;
const dataType = zclId.attrType(cluster, attribute.attr).value;