homebridge-delay-switch
Advanced tools
Comparing version 0.0.4 to 0.0.5
16
index.js
@@ -35,13 +35,11 @@ var Service, Characteristic, Accessory; | ||
this.log("Setting switch to " + on); | ||
if (on == 1) { | ||
clearTimeout(this.Timer); | ||
this.Timer = setTimeout(function() { | ||
this.service.setCharacteristic(Characteristic.On, false); | ||
}, this.delayTime); | ||
} | ||
else { | ||
clearTimeout(this.Timer); | ||
} | ||
var self = this; | ||
if (on) { | ||
clearTimeout(self.Timer); | ||
self.Timer = setTimeout(function() { | ||
self.service.getCharacteristic(Characteristic.On).updateValue(false); | ||
}, self.delayTime); | ||
} else clearTimeout(self.Timer); | ||
callback(); | ||
} |
{ | ||
"name": "homebridge-delay-switch", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Delay switches for Homebridge: https://github.com/nfarina/homebridge", | ||
@@ -5,0 +5,0 @@ "license": "ISC", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4204
34