homebridge-lg-airco
Advanced tools
Comparing version 0.0.94 to 0.0.95
{ | ||
"name": "homebridge-lg-airco", | ||
"version": "0.0.94", | ||
"version": "0.0.95", | ||
"description": "Homebridge plugin to control a Smart Thinq enabled LG airco unit. Makes use of WideQ => https://github.com/sampsyo/wideq", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -93,6 +93,8 @@ const Wideq = require("./lg/wideq").Wideq; | ||
const isOn = shouldBeActive === Characteristic.Active.ACTIVE; | ||
me.wideq.turnOnOrOff(me.deviceId, isOn).then((done) => { | ||
me.isOn = isOn; | ||
}); | ||
if(shouldBeActive !== me.isOn) { | ||
const isOn = shouldBeActive === Characteristic.Active.ACTIVE; | ||
me.wideq.turnOnOrOff(me.deviceId, isOn).then((done) => { | ||
me.isOn = isOn; | ||
}); | ||
} | ||
@@ -179,4 +181,7 @@ callback(null); | ||
console.log('Setting rotation speed: ' + targetRotationSpeed); | ||
this.state.isOn = true; | ||
me.state.speed = targetRotationSpeed; | ||
me.state.isOn = true; | ||
//TODO: When dragging the slider, this is called repeatedly, causing too many state updates! | ||
//TODO: This needs to be debounced! | ||
/* | ||
@@ -186,3 +191,3 @@ me.wideq.setSpeed(me.deviceId, targetRotationSpeed) | ||
me.state.speed = targetRotationSpeed; | ||
this.state.isOn = true; | ||
me.state.isOn = true; | ||
}) | ||
@@ -189,0 +194,0 @@ .catch((error) => { |
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
104321
378