From 75981c12edfb57d076c956a888d7d3edeaae8489 Mon Sep 17 00:00:00 2001 From: AlCalzone Date: Thu, 14 Nov 2024 12:03:13 +0100 Subject: [PATCH] fix: save value change options on ZWaveNode instance (#4009) --- api/lib/ZwaveClient.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/lib/ZwaveClient.ts b/api/lib/ZwaveClient.ts index d4a59cab1b..109e738408 100644 --- a/api/lib/ZwaveClient.ts +++ b/api/lib/ZwaveClient.ts @@ -2553,13 +2553,15 @@ class ZwaveClient extends TypedEventEmitter { props: Pick, ) { const node = this._nodes.get(nodeId) + const zwaveNode = this.getNode(nodeId) - if (!node) { + if (!zwaveNode) { throw Error('Invalid Node ID') } for (const k in props) { - node[k] = props[k] + zwaveNode[k] = props[k] + if (node) node[k] = props[k] } }