Skip to content

Commit

Permalink
fix: endpoint.configureReporting should use manufacturerCode when def…
Browse files Browse the repository at this point in the history
…ined

Fixes #843
  • Loading branch information
sjorge committed Dec 27, 2023
1 parent 8208402 commit b394e9d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/controller/model/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -627,12 +627,14 @@ class Endpoint extends Entity {
if (typeof item.attribute === 'object') {
dataType = item.attribute.type;
attrId = item.attribute.ID;
if (item.attribute.hasOwnProperty('manufacturerCode')) options.manufacturerCode = item.attribute.manufacturerCode;

Check failure on line 630 in src/controller/model/endpoint.ts

View workflow job for this annotation

GitHub Actions / ci

Property 'manufacturerCode' does not exist on type '{ ID: number; type: number; }'.
} else {
/* istanbul ignore else */
if (cluster.hasAttribute(item.attribute)) {
const attribute = cluster.getAttribute(item.attribute);
dataType = attribute.type;
attrId = attribute.ID;
if (attribute.hasOwnProperty('manufacturerCode')) options.manufacturerCode = attribute.manufacturerCode;
}
}

Expand Down

0 comments on commit b394e9d

Please sign in to comment.