homebridge-delay-switch
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -8,2 +8,3 @@ | ||
Characteristic = homebridge.hap.Characteristic; | ||
let UUIDGen = api.hap.uuid; | ||
@@ -14,3 +15,5 @@ homebridge.registerAccessory("homebridge-delay-switch", "DelaySwitch", delaySwitch); | ||
function delaySwitch(log, config) { | ||
function delaySwitch(log, config, api) { | ||
let UUIDGen = api.hap.uuid; | ||
this.log = log; | ||
@@ -23,3 +26,3 @@ this.name = config['name']; | ||
this.motionTriggered = false; | ||
this.uuid = UUIDGen.generate(this.name) | ||
} | ||
@@ -33,3 +36,3 @@ | ||
.setCharacteristic(Characteristic.Model, "Delay Model") | ||
.setCharacteristic(Characteristic.SerialNumber, "Delay Serial Number"); | ||
.setCharacteristic(Characteristic.SerialNumber, this.uuid); | ||
@@ -36,0 +39,0 @@ |
{ | ||
"name": "homebridge-delay-switch", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Delay switches for Homebridge: https://github.com/nfarina/homebridge", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
6851
72
3