From 0ff111cd62da33cebb3e2072d5159a94bcd8fc5f Mon Sep 17 00:00:00 2001 From: Dominic Griesel Date: Tue, 9 Jul 2024 09:51:24 +0200 Subject: [PATCH] fix: assume support before interviewing Basic CC --- packages/cc/src/cc/BasicCC.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/cc/src/cc/BasicCC.ts b/packages/cc/src/cc/BasicCC.ts index 0507077d3a67..5f635e70cd99 100644 --- a/packages/cc/src/cc/BasicCC.ts +++ b/packages/cc/src/cc/BasicCC.ts @@ -257,17 +257,20 @@ export class BasicCC extends CommandClass { direction: "none", }); + // Assume that the endpoint supports Basic CC, so the values get persisted correctly. + endpoint.addCC(CommandClasses.Basic, { isSupported: true }); + // try to query the current state await this.refreshValues(applHost); - // Remove Basic CC support when there was no response + // Remove Basic CC support again when there was no response if ( this.getValue(applHost, BasicCCValues.currentValue) == undefined ) { applHost.controllerLog.logNode(node.id, { endpoint: this.endpointIndex, message: - "No response to Basic Get command, assuming the node does not support Basic CC...", + "No response to Basic Get command, assuming Basic CC is unsupported...", }); // SDS14223: A controlling node MUST conclude that the Basic Command Class is not supported by a node (or // endpoint) if no Basic Report is returned.