Skip to content

Commit

Permalink
fix(trigger-state): enable/disable inputs correctly update state of s…
Browse files Browse the repository at this point in the history
…witch in HA

Fixes #233
  • Loading branch information
zachowj committed Apr 25, 2020
1 parent 0162db6 commit b86e32a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nodes/trigger-state/trigger-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ module.exports = function (RED) {
this.isEnabled = true;
this.saveNodeData('isEnabled', true);
this.updateConnectionStatus();
this.updateHomeAssistant();
return;
}
if (message === 'disable' || message.payload === 'disable') {
this.isEnabled = false;
this.saveNodeData('isEnabled', false);
this.updateConnectionStatus();
this.updateHomeAssistant();
return;
}

Expand Down

0 comments on commit b86e32a

Please sign in to comment.