Updates
This commit is contained in:
13
conf/resources/scripts/conditions/Any sensor tripped.js
Normal file
13
conf/resources/scripts/conditions/Any sensor tripped.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// gets each sensor passed in by their uid and
|
||||
// then returns true if any of them are tripped
|
||||
anyTripped = false;
|
||||
|
||||
for (var key in uidTags) {
|
||||
var uidThing = mcApi.uidTag().getByUid(uidTags[key]);
|
||||
if (uidThing && uidThing.getResource().value === "1") {
|
||||
anyTripped = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
anyTripped;
|
||||
Reference in New Issue
Block a user