Skip to content

Commit

Permalink
Merge pull request #51 from radionoise/feature/no-response-trigger
Browse files Browse the repository at this point in the history
"No response" status can now be programmatically triggered
  • Loading branch information
Shaquu authored Mar 5, 2019
2 parents d8fb574 + 10b9fe4 commit 72e5563
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/HAPServiceNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,14 @@ module.exports = function(RED) {
supported.write.join(", ")
);
} else {
var noResponseMsg = "NO_RESPONSE";

if (msg.payload[key] === noResponseMsg) {
service.setCharacteristic(Characteristic[key], new Error(noResponseMsg));

return;
}

if (context !== null) {
service.setCharacteristicWithContext(
Characteristic[key],
Expand Down

0 comments on commit 72e5563

Please sign in to comment.