syntex-automation
Advanced tools
Comparing version 1.2.1-b20 to 1.2.1-b21
{ | ||
"name": "syntex-automation", | ||
"version": "1.2.1-b20", | ||
"version": "1.2.1-b21", | ||
"description": "An automation system for your smart home", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -866,2 +866,47 @@ module.exports = class Automation | ||
if(block.comparison != null) | ||
{ | ||
if(block.id == service.id && block.letters == service.letters) | ||
{ | ||
this._getState(automation, block.comparison).then((comparison) => { | ||
block.state = comparison; | ||
resolve(checkCharacteristics({ block, state })); | ||
}); | ||
} | ||
else if(block.comparison.id == service.id && block.comparison.letters == service.letters) | ||
{ | ||
this._getState(automation, block).then((comparison) => { | ||
block.state = state; | ||
resolve(checkCharacteristics({ block, state : comparison })); | ||
}); | ||
} | ||
else | ||
{ | ||
this._getState(automation, block).then((state) => { | ||
this._getState(automation, block.comparison).then((comparison) => { | ||
block.state = comparison; | ||
resolve(checkCharacteristics({ block, state })); | ||
}); | ||
}); | ||
} | ||
} | ||
else | ||
{ | ||
if(block.id == service.id && block.letters == service.letters) | ||
{ | ||
resolve(checkCharacteristics({ block, state })); | ||
} | ||
else | ||
{ | ||
this._getState(automation, block).then((state) => resolve(checkCharacteristics({ block, state }))); | ||
} | ||
} | ||
if(block.id == service.id && block.letters == service.letters) | ||
@@ -889,19 +934,5 @@ { | ||
if(block.characteristics != null) | ||
{ | ||
block.state = {}; | ||
block.state = state; | ||
for(const x in block.characteristics) | ||
{ | ||
block.state[x] = state[x]; | ||
} | ||
resolve(checkCharacteristics({ block, state : comparison })); | ||
} | ||
else | ||
{ | ||
block.state = state; | ||
resolve(checkCharacteristics({ block, state : comparison })); | ||
} | ||
resolve(checkCharacteristics({ block, state : comparison })); | ||
}); | ||
@@ -908,0 +939,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
26849
812