Socket
Socket
Sign inDemoInstall

homebridge-lg-airco

Package Overview
Dependencies
0
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.997 to 0.0.998

2

package.json
{
"name": "homebridge-lg-airco",
"version": "0.0.997",
"version": "0.0.998",
"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",

@@ -73,3 +73,3 @@ const Wideq = require("./lg/wideq").Wideq;

console.log(this.state);
//console.log(this.state);

@@ -96,3 +96,3 @@ this.getActive((unknown, value) => {

if (this.state.isOn) {
console.log('setting fast interval');
console.log('Setting fast as status interval');
this.intervalWhenOn = setInterval(() => {

@@ -102,3 +102,3 @@ this.updateState()

} else {
console.log('setting slow interval');
console.log('Setting slow ac status interval');
this.intervalWhenOff = setInterval(() => {

@@ -122,10 +122,8 @@ this.updateState();

if (shouldBeActive !== (me.state.isOn ? 1 : 0)) {
const isOn = shouldBeActive === Characteristic.Active.ACTIVE;
console.log('Turning ac ' + (isOn ? 'on' : 'off') + '!');
me.wideq.turnOnOrOff(me.deviceId, isOn)
const turnOnOrOff = shouldBeActive === Characteristic.Active.ACTIVE;
if (me.state.isOn !== turnOnOrOff) {
console.log('Turning ac ' + (turnOnOrOff ? 'on' : 'off') + '!');
me.wideq.turnOnOrOff(me.deviceId, turnOnOrOff)
.then((done) => {
me.state.isOn = isOn;
me.state.isOn = turnOnOrOff;
me.setCorrectInterval();

@@ -170,11 +168,15 @@ });

let turnOn = false;
let turnOnOrOff = false;
if (targetState !== Characteristic.TargetHeaterCoolerState.AUTO) {
turnOn = true;
turnOnOrOff = true;
}
me.wideq.turnOnOrOff(me.deviceId, turnOn).then((done) => {
me.state.isOn = turnOn;
me.state.isOn = turnOn;
});
if(me.state.isOn !== turnOnOrOff) {
console.log('Turning ac ' + (turnOnOrOff ? 'on' : 'off') + '!');
me.wideq.turnOnOrOff(me.deviceId, turnOnOrOff)
.then((done) => {
me.state.isOn = turnOnOrOff;
me.setCorrectInterval();
});
}

@@ -181,0 +183,0 @@ callback(null);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc