Skip to content

Commit

Permalink
Merge pull request #45 from moosebert/master
Browse files Browse the repository at this point in the history
Proposed LockTargetState condition match and fixes #44
  • Loading branch information
SphtKr committed Sep 11, 2016
2 parents 4a29774 + b412c51 commit 69a7ff6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,10 @@ if(!vdev) debug("ERROR: vdev passed to getVDevServices is undefined!");
val = Characteristic.LockTargetState.UNSECURED;
} else if(vdev.metrics.level === "closed") {
val = Characteristic.LockTargetState.SECURED;
} else if(vdev.metrics.level === "close") {
val = Characteristic.LockTargetState.SECURED;
}
debug("Returning LockTargetState of \"" + val + "\" because vdev.metrics.level returned \"" + vdev.metrics.level + "\"");
return val;
};
cx.value = cx.zway_getValueFromVDev(vdev);
Expand Down

0 comments on commit 69a7ff6

Please sign in to comment.