homebridge-syntex-webhooks
Advanced tools
Comparing version 2.3.9-b4 to 2.3.9-b5
{ | ||
"name": "homebridge-syntex-webhooks", | ||
"version": "2.3.9-b4", | ||
"version": "2.3.9-b5", | ||
"description": "A webhook plugin for HTTP devices", | ||
@@ -15,3 +15,3 @@ "main": "index.js", | ||
"color-convert": "^1.5.0", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b54", | ||
"homebridge-syntex-dynamic-platform": "1.0.8-b56", | ||
"json-fs-store": "^1.0.1" | ||
@@ -18,0 +18,0 @@ }, |
@@ -53,7 +53,14 @@ const { ColoredBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
super.setHue(this.tempState.hue, null, false); | ||
super.setSaturation(this.tempState.saturation, null, false); | ||
super.setBrightness(this.tempState.brightness, null, false); | ||
if(this.changedValue) | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
} | ||
if(this.changedColor) | ||
{ | ||
super.setHue(this.tempState.hue, null, false); | ||
super.setSaturation(this.tempState.saturation, null, false); | ||
super.setBrightness(this.tempState.brightness, null, false); | ||
} | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [' + this.getStateText() + '] ( ' + this.id + ' )'); | ||
@@ -60,0 +67,0 @@ } |
@@ -39,5 +39,12 @@ const { DimmedBulbService } = require('homebridge-syntex-dynamic-platform'); | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
super.setBrightness(this.tempState.brightness, null, false); | ||
if(this.changedValue) | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
} | ||
if(this.changedBrightness) | ||
{ | ||
super.setBrightness(this.tempState.brightness, null, false); | ||
} | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [' + this.getStateText() + '] ( ' + this.id + ' )'); | ||
@@ -44,0 +51,0 @@ } |
@@ -37,11 +37,26 @@ const { ThermostatService } = require('homebridge-syntex-dynamic-platform'); | ||
this.DeviceManager.fetchRequests(this, { value : this.value, target : this.target, state : this.state, mode : this.mode }).then((success) => { | ||
this.DeviceManager.fetchRequests(this, { value : this.tempState.value, target : this.tempState.target, state : this.tempState.state, mode : this.tempState.mode }).then((success) => { | ||
if(success) | ||
{ | ||
super.setState(this.value, null, false); | ||
super.setTargetTemperature(this.target, null, false); | ||
super.setCurrentHeatingCoolingState(this.state, null, false); | ||
super.setTargetHeatingCoolingState(this.mode, null, false); | ||
if(this.changedValue) | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
} | ||
if(this.changedTarget) | ||
{ | ||
super.setTargetTemperature(this.tempState.target, null, false); | ||
} | ||
if(this.changedState) | ||
{ | ||
super.setCurrentHeatingCoolingState(this.tempState.state, null, false); | ||
} | ||
if(this.changedMode) | ||
{ | ||
super.setTargetHeatingCoolingState(this.tempState.mode, null, false); | ||
} | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [' + this.getStateText() + '] ( ' + this.id + ' )'); | ||
@@ -70,2 +85,19 @@ } | ||
}, (resolve) => { | ||
var changed = this.changedValue || this.changedState; | ||
if(changed) | ||
{ | ||
if(this.changedValue) | ||
{ | ||
super.setState(this.tempState.value, null, false); | ||
} | ||
if(this.changedState) | ||
{ | ||
super.setCurrentHeatingCoolingState(this.tempState.state, null, false); | ||
} | ||
this.logger.log('update', this.id, this.letters, '%update_state[0]% [' + this.name + '] %update_state[1]% [' + this.getStateText() + '] ( ' + this.id + ' )'); | ||
} | ||
@@ -78,4 +110,9 @@ if(callback != null) | ||
resolve(); | ||
if(changed) | ||
{ | ||
this.AutomationSystem.LogikEngine.runAutomation(this, { value : this.value, target : this.target, state : this.state, mode : this.mode }); | ||
} | ||
}); | ||
} | ||
}; |
52599
952
+ Addedhomebridge-syntex-dynamic-platform@1.0.8-b56(transitive)
- Removedhomebridge-syntex-dynamic-platform@1.0.8-b54(transitive)