From ac2ec7370e9e480d8b16f1cdeb3a7a6c8da0f80f Mon Sep 17 00:00:00 2001 From: asgothian <45667167+asgothian@users.noreply.github.com> Date: Thu, 14 Nov 2024 12:49:51 +0100 Subject: [PATCH] Update main.js --- main.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/main.js b/main.js index 0c358a1c..f6b86dde 100644 --- a/main.js +++ b/main.js @@ -715,12 +715,20 @@ class Zigbee extends utils.Adapter { if (!c.hasOwnProperty('convertSet')) continue; this.log.debug(`Type of toZigbee is '${typeof c}', Contains key ${(c.hasOwnProperty('key')?JSON.stringify(c.key):'false ')}`) - if (!c.hasOwnProperty('key') && c.hasOwnProperty('convertSet') && converter === undefined) + if (!c.hasOwnProperty('key')) { - converter = c; - - if (has_elevated_debug) this.log.warn(`ELEVATED: setting converter to keyless converter for ${deviceId} of type ${model}`) - this.log.debug('setting converter to keyless converter') + if (c.hasOwnProperty('convertSet') && converter === undefined) + { + converter = c; + + if (has_elevated_debug) this.log.warn(`ELEVATED: setting converter to keyless converter for ${deviceId} of type ${model}`) + this.log.debug('setting converter to keyless converter') + } + else + { + if (has_elevated_debug) this.log.warn(`ELEVATED: ignoring keyless converter for ${deviceId} of type ${model}`) + this.log.debug('ignoring keyless converter') + } continue; } if (c.key.includes(stateDesc.prop) || c.key.includes(stateDesc.setattr) || c.key.includes(stateDesc.id))