homebridge-lg-airco
Advanced tools
Comparing version 0.0.974 to 0.0.975
{ | ||
"name": "homebridge-lg-airco", | ||
"version": "0.0.974", | ||
"version": "0.0.975", | ||
"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", |
@@ -97,10 +97,8 @@ const Wideq = require("./lg/wideq").Wideq; | ||
console.log('Setting active: ' + shouldBeActive); | ||
console.log('Current state:' + me.state.isOn); | ||
if(shouldBeActive !== (me.state.isOn ? 1 : 0)) { | ||
if (shouldBeActive !== (me.state.isOn ? 1 : 0)) { | ||
const isOn = shouldBeActive === Characteristic.Active.ACTIVE; | ||
me.wideq.turnOnOrOff(me.deviceId, isOn).then((done) => { | ||
me.state.isOn = isOn; | ||
}); | ||
me.wideq.turnOnOrOff(me.deviceId, isOn) | ||
.then((done) => { | ||
me.state.isOn = isOn; | ||
}); | ||
} | ||
@@ -143,4 +141,2 @@ | ||
console.log('Setting cooler state: ' + targetState); | ||
let turnOn = false; | ||
@@ -169,4 +165,2 @@ if (targetState !== Characteristic.TargetHeaterCoolerState.AUTO) { | ||
console.log('Setting threshold temperature: ' + targetCoolingTemp); | ||
me.wideq.setTemp(me.deviceId, targetCoolingTemp) | ||
@@ -192,12 +186,6 @@ .then((done) => { | ||
}, | ||
setActualRotationSpeed: function(targetRotationSpeed) { | ||
setActualRotationSpeed: function (targetRotationSpeed) { | ||
const me = this; | ||
console.log('Setting rotation speed: ' + targetRotationSpeed); | ||
//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! | ||
/* | ||
me.wideq.setSpeed(me.deviceId, targetRotationSpeed) | ||
@@ -212,3 +200,2 @@ .then((done) => { | ||
}); | ||
*/ | ||
}, | ||
@@ -215,0 +202,0 @@ |
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
104983
398