Skip to content

Commit

Permalink
fix: query Basic CC version as part of the interview
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed May 17, 2024
1 parent 4f71630 commit 93af9be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/cc/src/cc/VersionCC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,14 @@ export class VersionCC extends CommandClass {
message: "querying CC versions...",
direction: "outbound",
});
// Basic CC is not included in the NIF, so it won't be returned by endpoint.getCCs() at this point
{
const cc = CommandClasses.Basic;
// Skip the query of endpoint CCs that are also supported by the root device
if (this.endpointIndex === 0 || node.getCCVersion(cc) === 0) {
await queryCCVersion(cc);
}
}
for (const [cc] of endpoint.getCCs()) {
// We already queried the Version CC version at the start of this interview
if (cc === CommandClasses.Version) continue;
Expand Down

0 comments on commit 93af9be

Please sign in to comment.