Skip to content

Commit

Permalink
fix: revert to use start/stopLevelChange
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Dec 1, 2020
1 parent 116d426 commit 4c1bcda
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 5 additions & 3 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,11 @@ app.use(
)
app.use(cookieParser())

app.use(history({
index: '/'
}))
app.use(
history({
index: '/'
})
)

app.get('/', renderIndex)

Expand Down
5 changes: 1 addition & 4 deletions lib/ZwaveClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const {
extractFirmware
} = require('zwave-js')
const { applicationCCs, CommandClasses } = require('@zwave-js/core')
const { MultilevelSwitchCCStopLevelChange } = require('zwave-js/build/lib/commandclass/MultilevelSwitchCC')
const utils = reqlib('/lib/utils.js')
const EventEmitter = require('events')
const jsonStore = reqlib('/lib/jsonStore.js')
Expand Down Expand Up @@ -1931,9 +1930,7 @@ ZwaveClient.prototype.writeValue = async function (valueId, value) {
isNaN(value)
) {
if (/stop/i.test(value)) {
const cc = new MultilevelSwitchCCStopLevelChange(this.driver, valueId)
await this.driver.sendCommand(cc)
// await zwaveNode.commandClasses['Multilevel Switch'].stopLevelChange()
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 4c1bcda

Please sign in to comment.