mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-15 10:39:56 +00:00
Log error when zigbee command fails. #254
This commit is contained in:
+9
-1
@@ -185,7 +185,15 @@ class Zigbee {
|
||||
}
|
||||
|
||||
logger.info(`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
|
||||
device.functional(cid, cmd, zclData, callback);
|
||||
device.functional(cid, cmd, zclData, (error) => {
|
||||
if (error) {
|
||||
logger.error(
|
||||
`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep} ` +
|
||||
`failed with error ${error}`);
|
||||
}
|
||||
|
||||
callback(error);
|
||||
});
|
||||
}
|
||||
|
||||
read(deviceID, cid, attr, ep, callback) {
|
||||
|
||||
Reference in New Issue
Block a user