Skip to content

Commit

Permalink
next try to fix error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Apollon77 committed Feb 5, 2024
1 parent d3f5cfd commit 7a87662
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion daikin.js
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ async function storeDaikinData(err) {
};
const control = {};
for (const fieldName in fieldDef.control) {
if (controlInfo[fieldName] !== undefined) {
if (fieldName in controlInfo) {
control[fieldName] = controlInfo[fieldName];
delete controlInfo[fieldName];
}
Expand Down Expand Up @@ -612,6 +612,9 @@ async function handleDaikinUpdate(data, channel) {
adapter.log.error(`Error creating State: ${err.message}`);
}
}
else if (data[fieldName] === undefined) {
continue;
}
else {
valid = false;
if (channel !== 'deviceInfo' && fieldName !== 'power') {
Expand Down

0 comments on commit 7a87662

Please sign in to comment.