homebridge-abode
Advanced tools
Comparing version 0.0.19 to 0.1.0
20
index.js
@@ -14,2 +14,13 @@ var Service; | ||
this.name = config.name; | ||
this.lockService = new Service.LockMechanism(this.name); | ||
this.lockService | ||
.getCharacteristic(Characteristic.LockTargetState) | ||
.on('get', this.getAlarmStatus.bind(this)) | ||
.on('set', this.setAlarmStatus.bind(this)); | ||
this.lockService | ||
.getCharacteristic(Characteristic.LockCurrentState) | ||
.on('get', this.getAlarmStatus.bind(this)); | ||
} | ||
@@ -54,2 +65,3 @@ | ||
.then(() => { | ||
this.lockservice.setCharacteristic(Characteristic.LockCurrentState, status); | ||
this.log(`${this.name}: Set status to ${status}`); | ||
@@ -66,11 +78,3 @@ return callback(null); | ||
this.log(`${this.name}: Getting Services`); | ||
this.lockService = new Service.LockMechanism(this.name); | ||
this.lockService | ||
.getCharacteristic(Characteristic.LockCurrentState) | ||
.on('get', this.getAlarmStatus.bind(this)) | ||
.on('set', this.setAlarmStatus.bind(this)); | ||
return [this.lockService]; | ||
}; |
{ | ||
"name": "homebridge-abode", | ||
"version": "0.0.19", | ||
"version": "0.1.0", | ||
"description": "Abode Plugin for homebridge", | ||
@@ -5,0 +5,0 @@ "scripts": { |
8063
241