Skip to content

Commit

Permalink
Renamed method calls based on node-alarm-dot-com refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
mkormendy committed Jan 15, 2020
1 parent ab57ab8 commit b3f34d0
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ class ADCPlatform {
}

configureAccessory(accessory) {
// This calls the configureAccessory in homebridge core

if (this.config.logLevel > 2)
this.log(`Loaded from cache: ${accessory.context.name} (${accessory.context.accID})`)
Expand Down Expand Up @@ -693,9 +694,9 @@ class ADCPlatform {
let method

if (value) {
method = nodeADC.turnOnLight
method = nodeADC.setLightOn
} else {
method = nodeADC.turnOffLight
method = nodeADC.setLightOff
}

if (this.config.logLevel > 2)
Expand Down Expand Up @@ -835,10 +836,10 @@ class ADCPlatform {

switch (value) {
case Characteristic.LockTargetState.UNSECURED:
method = nodeADC.unsecureLock
method = nodeADC.setLockUnsecure
break
case Characteristic.LockTargetState.SECURED:
method = nodeADC.secureLock
method = nodeADC.setLockSecure
break
default:
const msg = `Can't set LockMechanism to unknown value ${value}`
Expand Down

0 comments on commit b3f34d0

Please sign in to comment.