Skip to content

Commit

Permalink
value undefied
Browse files Browse the repository at this point in the history
  • Loading branch information
arteck authored Jul 31, 2023
1 parent ea04677 commit 9e27503
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,17 +485,19 @@ class Zigbee extends utils.Adapter {

for (const key of keys) {
const value = message.data[key];
if (key == 65282) {
voltage = value[1][1].elmVal;
battKey = true;
break;
}
if (key == 65281) {
voltage = value[1];
battKey = true;
break;
if (value != undefined) {
if (key == 65282) {
voltage = value[1][1].elmVal;
battKey = true;
break;
}
if (key == 65281 && value[1] != undefined) {) {
voltage = value[1];
battKey = true;
break;
}
}
};
}
}
}

Expand Down

0 comments on commit 9e27503

Please sign in to comment.