mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-10-22 14:01:20 +00:00
Fixed bug
This commit is contained in:
1 parent
0b1a4f772e
commit
3fcc8278d8
1 file changed
+5
-2
@@ -24,8 +24,11 @@ shepherd.on('permitJoining', function(joinTimeLeft) {
|
||||
});
|
||||
shepherd.on('ind', function(msg) {
|
||||
var pl = null;
|
||||
topic = 'xiaomiZb/' + msg.endpoints[0].device.ieeeAddr.substr(2);
|
||||
|
||||
var topic = 'xiaomiZb/';
|
||||
|
||||
if(msg.endpoints.length > 0 && typeof msg.endpoints[0].device !== "undefined")
|
||||
topic += msg.endpoints[0].device.ieeeAddr.substr(2);
|
||||
|
||||
switch (msg.type) {
|
||||
case 'devIncoming':
|
||||
console.log('Device: ' + msg.data + ' joining the network!');
|
||||
|
||||
Reference in new issue
Block a user