homebridge-syntex-webhooks
Advanced tools
Comparing version 2.3.7 to 2.3.8-b1
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "2.3.7", | ||
"version": "2.3.8-b1", | ||
"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-b6", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b7", | ||
"json-fs-store": "^1.0.1" | ||
@@ -19,0 +19,0 @@ }, |
@@ -26,2 +26,4 @@ const { DimmedBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
} | ||
this.AutomationSystem.LogikEngine.runAutomation(this, state); | ||
}); | ||
@@ -38,3 +40,8 @@ }; | ||
{ | ||
this.setToCurrentBrightness({ value }, () => super.setState(value, () => callback())); | ||
this.setToCurrentBrightness({ value }, () => { | ||
super.setState(value, () => callback()); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value, brightness : this.brightness }); | ||
}); | ||
} | ||
@@ -49,3 +56,8 @@ | ||
{ | ||
this.setToCurrentBrightness({ brightness }, () => super.setBrightness(brightness, () => callback())); | ||
this.setToCurrentBrightness({ brightness }, () => { | ||
super.setBrightness(brightness, () => callback()); | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, brightness }); | ||
}); | ||
} | ||
@@ -55,41 +67,31 @@ | ||
{ | ||
if(state.value != null && this.value != state.value) | ||
{ | ||
this.value = state.value; | ||
const setBrightness = (resolve) => { | ||
this.changed = true; | ||
} | ||
this.DeviceManager.fetchRequests(this, { value : this.value, brightness : this.brightness }).then((success) => { | ||
if(state.brightness != null && this.brightness != state.brightness) | ||
{ | ||
this.brightness = state.brightness; | ||
if(success) | ||
{ | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [value: ' + this.value + ', brightness: ' + this.brightness + '] ( ' + this.id + ' )'); | ||
} | ||
this.changed = true; | ||
} | ||
if(callback != null) | ||
{ | ||
callback(); | ||
} | ||
setTimeout(() => { | ||
resolve(); | ||
}); | ||
}; | ||
if(!this.running) | ||
{ | ||
this.running = true; | ||
super.setToCurrentBrightness(state, (resolve) => { | ||
this.DeviceManager.fetchRequests(this, { value : this.value, brightness : this.brightness }).then((success) => { | ||
setBrightness(resolve); | ||
if(success && this.changed) | ||
{ | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [value: ' + this.value + ', brightness: ' + this.brightness + '] ( ' + this.id + ' )'); | ||
} | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, brightness : this.brightness }); | ||
if(callback != null) | ||
{ | ||
callback(); | ||
} | ||
}, (resolve) => { | ||
this.changed = false; | ||
this.running = false; | ||
}); | ||
} | ||
else if(callback != null) | ||
setBrightness(resolve); | ||
}, (resolve) => { | ||
if(callback != null) | ||
{ | ||
@@ -99,4 +101,5 @@ callback(); | ||
}, 100); | ||
resolve(); | ||
}); | ||
} | ||
}; |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
56454
1069
1
+ Addedhomebridge-syntex-dynamic-platform@1.0.8-b7(transitive)
- Removedhomebridge-syntex-dynamic-platform@1.0.8-b6(transitive)