syntex-automation
Advanced tools
Comparing version 1.2.1-b22 to 1.2.1-b23
@@ -0,0 +0,0 @@ { |
{ | ||
"name": "syntex-automation", | ||
"version": "1.2.1-b22", | ||
"version": "1.2.1-b23", | ||
"description": "An automation system for your smart home", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -594,3 +594,3 @@ module.exports = class Automation | ||
if(block.id != null && block.letters != null && block.operation != null && block.state instanceof Object) | ||
if(block.id != null && block.letters != null && block.operation != null && block.state instanceof Object && state instanceof Object) | ||
{ | ||
@@ -841,26 +841,27 @@ var success = true; | ||
if(result.state instanceof Object && result.block instanceof Object && result.block.characteristics instanceof Object) | ||
if(result.state instanceof Object && result.block instanceof Object) | ||
{ | ||
var characteristics = Object.keys(result.block.characteristics); | ||
if(result.block.characteristic instanceof Object) | ||
{ | ||
var characteristic = Object.keys(result.block.characteristic)[0]; | ||
for(const x in result.block.state) | ||
{ | ||
if(!characteristics.includes(x)) | ||
result.state = {}; | ||
if(result.state[characteristic] != null) | ||
{ | ||
delete result.block.state[x]; | ||
result.state.value = result.state[characteristic] + result.block.characteristic[characteristic]; | ||
} | ||
} | ||
for(const x in result.state) | ||
if(result.block.comparison instanceof Object && result.block.comparison.characteristic instanceof Object) | ||
{ | ||
if(!characteristics.includes(x)) | ||
var characteristic = Object.keys(result.block.comparison.characteristic)[0]; | ||
result.block.state = {}; | ||
if(result.block.state[characteristic] != null) | ||
{ | ||
delete result.state[x]; | ||
result.block.state.value = result.block.state[characteristic] + result.block.comparison.characteristic[characteristic]; | ||
} | ||
} | ||
for(const x in result.block.state) | ||
{ | ||
result.block.state[x] += result.block.characteristics[x]; | ||
} | ||
} | ||
@@ -867,0 +868,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
26497
787