Skip to content

Commit

Permalink
fix: set version for Basic CC if Version CC is not supported (#7012)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone authored Jul 15, 2024
1 parent fec4738 commit 0ef5a27
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/zwave-js/src/lib/node/Node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,11 @@ protocol version: ${this.protocolVersion}`;
);

for (const [ccId, info] of this.getCCs()) {
if (info.isSupported) {
if (
info.isSupported
// The support status of Basic CC is not known yet at this point
|| ccId === CommandClasses.Basic
) {
this.addCC(ccId, { version: getImplementedVersion(ccId) });
}
}
Expand Down Expand Up @@ -2678,7 +2682,11 @@ protocol version: ${this.protocolVersion}`;
});

for (const [ccId, info] of endpoint.getCCs()) {
if (info.isSupported) {
if (
info.isSupported
// The support status of Basic CC is not known yet at this point
|| ccId === CommandClasses.Basic
) {
endpoint.addCC(ccId, {
version: getImplementedVersion(ccId),
});
Expand Down

0 comments on commit 0ef5a27

Please sign in to comment.