homebridge-syntex-dynamic-platform
Advanced tools
Comparing version 1.0.8-b52 to 1.0.8-b53
{ | ||
"name": "homebridge-syntex-dynamic-platform", | ||
"version": "1.0.8-b52", | ||
"version": "1.0.8-b53", | ||
"description": "A Dynamic Platform Accessory", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -151,2 +151,34 @@ const BaseService = require('../base'); | ||
} | ||
setToCurrentState(state, targetCallback, modeCallback, unchangedCallback) | ||
{ | ||
if(state.target != null && (!super.hasState('target') || this.target != state.target)) | ||
{ | ||
this.changedTarget = true; | ||
} | ||
if(state.mode != null && (!super.hasState('mode') || this.mode != state.mode)) | ||
{ | ||
this.changedMode = true; | ||
} | ||
if(this.changedTarget) | ||
{ | ||
targetCallback(() => { | ||
this.changedTarget = false; | ||
}); | ||
} | ||
else if(this.changedMode) | ||
{ | ||
modeCallback(() => { | ||
this.changedMode = false; | ||
}); | ||
} | ||
else | ||
{ | ||
unchangedCallback(() => {}); | ||
} | ||
} | ||
} |
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
80854
2325