Skip to content

Commit

Permalink
fix: manually send MultilevelSwitchCCStopLevelChange cc
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Dec 1, 2020
1 parent 64c78ea commit 4a02554
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/ZwaveClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4a02554

Please sign in to comment.