Skip to content

Commit

Permalink
adapt to node-red-contrib-ccu 3.0 changed setStatus behavior - hopefu…
Browse files Browse the repository at this point in the history
…lly solves #188
  • Loading branch information
hobbyquaker committed Oct 15, 2019
1 parent 25b813e commit 905eab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nodes/redmatic-homekit-homematic-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ module.exports = function (RED) {
this.ccuStatus = data;
let status = 0;
Object.keys(data.ifaceStatus).forEach(s => {
if (data.ifaceStatus[s] || s === 'ReGaHSS') {
if (data.ifaceStatus[s]) {
status += 1;
}
});
this.debug(JSON.stringify(data));
if (status <= 1) {
if (status < 1) {
this.status({fill: 'red', shape: 'dot', text: 'disconnected'});
} else if (status === this.ccu.enabledIfaces.length) {
this.status({fill: 'green', shape: 'dot', text: 'connected'});
Expand Down

0 comments on commit 905eab8

Please sign in to comment.