This commit is contained in:
Koen Kanters
2018-09-14 08:33:28 +02:00
committed by GitHub
parent f916ec5f4c
commit d5de918247
+2 -9
View File
@@ -191,15 +191,8 @@ class Zigbee {
}
logger.info(`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
let func = null;
if (type === 'foundation') {
func = (cb) => device.foundation(cid, cmd, [zclData], cb);
} else if (type === 'functional') {
func = (cb) => device.functional(cid, cmd, zclData, cb);
}
func((error) => {
device[type](cid, cmd, [zclData], (error) => {
if (error) {
logger.error(
`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep} ` +