Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-syntex-webhooks

Package Overview
Dependencies
Maintainers
1
Versions
1176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-syntex-webhooks - npm Package Compare versions

Comparing version 2.3.8-b2 to 2.3.8-b20

7

package.json
{
"name": "homebridge-syntex-webhooks",
"version": "2.3.8-b2",
"version": "2.3.8-b20",
"description": "A webhook plugin for HTTP devices",

@@ -16,3 +16,3 @@ "main": "index.js",

"color-convert": "^1.5.0",
"homebridge-syntex-dynamic-platform": "1.0.8-b8",
"homebridge-syntex-dynamic-platform": "1.0.8-b26",
"json-fs-store": "^1.0.1"

@@ -43,4 +43,5 @@ },

"devDependencies": {
"eslint": "^8.7.0"
"eslint": "^8.7.0",
"eslint-plugin-react": "^7.31.11"
}
}

@@ -17,25 +17,6 @@ const { ColoredBulbService } = require('homebridge-syntex-dynamic-platform');

if(state.value != null)
{
super.setState(state.value,
() => this.service.getCharacteristic(this.Characteristic.On).updateValue(state.value));
}
if(state.hue != null)
{
super.setHue(state.hue,
() => this.service.getCharacteristic(this.Characteristic.Hue).updateValue(state.hue));
}
if(state.saturation != null)
{
super.setSaturation(state.saturation,
() => this.service.getCharacteristic(this.Characteristic.Saturation).updateValue(state.saturation));
}
if(state.brightness != null)
{
super.setBrightness(state.brightness,
() => this.service.getCharacteristic(this.Characteristic.Brightness).updateValue(state.brightness));
}
this.service.getCharacteristic(this.Characteristic.On).updateValue(this.value);
this.service.getCharacteristic(this.Characteristic.Hue).updateValue(this.hue);
this.service.getCharacteristic(this.Characteristic.Saturation).updateValue(this.saturation);
this.service.getCharacteristic(this.Characteristic.Brightness).updateValue(this.brightness);
});

@@ -52,3 +33,3 @@ };

{
this.setToCurrentColor({ value }, () => super.setState(value, () => callback()));
this.setToCurrentColor({ value }, () => callback());
}

@@ -63,3 +44,3 @@

{
this.setToCurrentColor({ hue }, () => super.setHue(hue, () => callback()));
this.setToCurrentColor({ hue }, () => callback());
}

@@ -74,3 +55,3 @@

{
this.setToCurrentColor({ saturation }, () => super.setSaturation(saturation, () => callback()));
this.setToCurrentColor({ saturation }, () => callback());
}

@@ -85,3 +66,3 @@

{
this.setToCurrentColor({ brightness }, () => super.setBrightness(brightness, () => callback()));
this.setToCurrentColor({ brightness }, () => callback());
}

@@ -93,9 +74,19 @@

this.DeviceManager.fetchRequests(this, { value : this.value, hue : this.hue, saturation : this.saturation, brightness : this.brightness }).then((success) => {
this.DeviceManager.fetchRequests(this, { value : this.tempState.value, hue : this.tempState.hue, saturation : this.tempState.saturation, brightness : this.tempState.brightness }).then((success) => {
if(success)
{
this.value = this.tempState.value;
this.hue = this.tempState.hue;
this.saturation = this.tempState.saturation;
this.brightness = this.tempState.brightness;
super.setState(this.value, () => {});
super.setHue(this.hue, () => {});
super.setSaturation(this.saturation, () => {});
super.setBrightness(this.brightness, () => {});
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [value: ' + this.value + ', hue: ' + this.hue + ', saturation: ' + this.saturation + ', brightness: ' + this.brightness + '] ( ' + this.id + ' )');
}
if(callback != null)

@@ -105,4 +96,6 @@ {

}
resolve();
resolve();
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, hue : this.hue, saturation : this.saturation, brightness : this.brightness });
});

@@ -109,0 +102,0 @@ };

@@ -15,15 +15,4 @@ const { DimmedBulbService } = require('homebridge-syntex-dynamic-platform');

if(state.value != null)
{
super.setState(state.value,
() => this.service.getCharacteristic(this.Characteristic.On).updateValue(state.value));
}
if(state.brightness != null)
{
super.setBrightness(state.brightness,
() => this.service.getCharacteristic(this.Characteristic.Brightness).updateValue(state.brightness));
}
this.AutomationSystem.LogikEngine.runAutomation(this, state);
this.service.getCharacteristic(this.Characteristic.On).updateValue(this.value);
this.service.getCharacteristic(this.Characteristic.Brightness).updateValue(this.brightness);
});

@@ -40,8 +29,3 @@ };

{
this.setToCurrentBrightness({ value }, () => {
super.setState(value, () => callback());
this.AutomationSystem.LogikEngine.runAutomation(this, { value, brightness : this.brightness });
});
this.setToCurrentBrightness({ value }, () => callback());
}

@@ -56,8 +40,3 @@

{
this.setToCurrentBrightness({ brightness }, () => {
super.setBrightness(brightness, () => callback());
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, brightness });
});
this.setToCurrentBrightness({ brightness }, () => callback());
}

@@ -69,6 +48,12 @@

this.DeviceManager.fetchRequests(this, { value : this.value, brightness : this.brightness }).then((success) => {
this.DeviceManager.fetchRequests(this, { value : this.tempState.value, brightness : this.tempState.brightness }).then((success) => {
if(success)
{
this.value = this.tempState.value;
this.brightness = this.tempState.brightness;
super.setState(this.value, () => {});
super.setBrightness(this.brightness, () => {});
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [value: ' + this.value + ', brightness: ' + this.brightness + '] ( ' + this.id + ' )');

@@ -83,2 +68,4 @@ }

resolve();
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, brightness : this.brightness });
});

@@ -85,0 +72,0 @@ };

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc