Skip to content

Commit

Permalink
respect regaEnabled settings (fix #16)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Aug 30, 2018
1 parent ebcefa0 commit abef752
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nodes/ccu-connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ module.exports = function (RED) {
this.methodCallQueue = {};

this.regaEnabled = config.regaEnabled;
this.regaPollEnabled = config.regaPoll;
this.regaInterval = parseInt(config.regaInterval, 10);

this.clients = {};
Expand Down Expand Up @@ -634,7 +635,7 @@ module.exports = function (RED) {
.then(() => this.getRegaPrograms())
.catch(err => this.logger.error('getRegaPrograms', err))
.then(() => {
if (this.regaInterval && this.regaEnabled && !this.cancelRegaPoll) {
if (this.regaInterval && this.regaPollEnabled && !this.cancelRegaPoll) {
this.logger.trace('rega next poll in', this.regaInterval, 'seconds');
this.regaPollTimeout = setTimeout(() => {
this.regaPoll();
Expand Down

0 comments on commit abef752

Please sign in to comment.