mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-21 02:51:11 +00:00
cId -> cid. #45
This commit is contained in:
+1
-1
@@ -201,7 +201,7 @@ class Controller {
|
||||
}
|
||||
};
|
||||
|
||||
this.zigbee.publish(deviceID, message.cId, message.cmd, message.zclData, ep, callback);
|
||||
this.zigbee.publish(deviceID, message.cid, message.cmd, message.zclData, ep, callback);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
const converters = {
|
||||
"state": (value) => {
|
||||
return {
|
||||
cId: 'genOnOff',
|
||||
cid: 'genOnOff',
|
||||
cmd: value.toLowerCase(),
|
||||
zclData: {},
|
||||
}
|
||||
},
|
||||
"brightness": (value) => {
|
||||
return {
|
||||
cId: 'genLevelCtrl',
|
||||
cid: 'genLevelCtrl',
|
||||
cmd: 'moveToLevel',
|
||||
zclData: {
|
||||
level: value,
|
||||
@@ -18,7 +18,7 @@ const converters = {
|
||||
},
|
||||
"color_temp": (value) => {
|
||||
return {
|
||||
cId: 'lightingColorCtrl',
|
||||
cid: 'lightingColorCtrl',
|
||||
cmd: 'moveToColorTemp',
|
||||
zclData: {
|
||||
colortemp: value,
|
||||
@@ -28,7 +28,7 @@ const converters = {
|
||||
},
|
||||
"color": (value) => {
|
||||
return {
|
||||
cId: 'lightingColorCtrl',
|
||||
cid: 'lightingColorCtrl',
|
||||
cmd: 'moveToColor',
|
||||
zclData: {
|
||||
colorx: value.x * 65535,
|
||||
|
||||
+3
-3
@@ -108,7 +108,7 @@ class Zigbee {
|
||||
return this.shepherd.list().find((d) => d.ieeeAddr === deviceID);
|
||||
}
|
||||
|
||||
publish(deviceID, cId, cmd, zclData, ep, callback) {
|
||||
publish(deviceID, cid, cmd, zclData, ep, callback) {
|
||||
// Find device in zigbee-shepherd
|
||||
let device = this.getDevice(deviceID);
|
||||
if (!device || !device.epList || !device.epList.length) {
|
||||
@@ -124,8 +124,8 @@ class Zigbee {
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info(`Zigbee publish to '${deviceID}', ${cId} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
|
||||
device.functional(cId, cmd, zclData, callback);
|
||||
logger.info(`Zigbee publish to '${deviceID}', ${cid} - ${cmd} - ${JSON.stringify(zclData)} - ${ep}`);
|
||||
device.functional(cid, cmd, zclData, callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user