From 4a02554636c623271425e2a58d6981d12f9c7f56 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 1 Dec 2020 15:14:48 +0100 Subject: [PATCH] fix: manually send MultilevelSwitchCCStopLevelChange cc --- lib/ZwaveClient.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ZwaveClient.js b/lib/ZwaveClient.js index c4e7b237909..c9c8b4b9b74 100644 --- a/lib/ZwaveClient.js +++ b/lib/ZwaveClient.js @@ -10,6 +10,7 @@ const { extractFirmware } = require('zwave-js') const { applicationCCs, CommandClasses } = require('@zwave-js/core') +const { MultilevelSwitchCCStopLevelChange } = require('zwave-js/CommandClass') const utils = reqlib('/lib/utils.js') const EventEmitter = require('events') const jsonStore = reqlib('/lib/jsonStore.js') @@ -1930,7 +1931,9 @@ ZwaveClient.prototype.writeValue = async function (valueId, value) { isNaN(value) ) { if (/stop/i.test(value)) { - await zwaveNode.commandClasses['Multilevel Switch'].stopLevelChange() + const cc = new MultilevelSwitchCCStopLevelChange(this.driver, valueId) + await this.driver.sendCommand(cc) + // await zwaveNode.commandClasses['Multilevel Switch'].stopLevelChange() } else if (/start/i.test(value)) { await zwaveNode.commandClasses['Multilevel Switch'].startLevelChange() } else {