Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
arteck authored Jul 28, 2023
1 parent 5ea5c18 commit 3776655
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,17 @@ class Zigbee extends utils.Adapter {
this.publishToState(devId, model, payload);
}
};

this.stController.collectOptions(devId, model, (options) => {
const converted = converter.convert(mappedModel, message, publish, options, meta);
if (converted) {
payload = {...payload, ...converted};
}

const converted = converter.convert(mappedModel, message, publish, mappedModel.options, meta);
if (converted) {
payload = {...payload, ...converted};
}

if (Object.keys(payload).length) {
publish(payload);
}
if (Object.keys(payload).length) {
publish(payload);
}
});
}
}

Expand Down

0 comments on commit 3776655

Please sign in to comment.