diff --git a/lib/mqtt/mqttClient.js b/lib/mqtt/mqttClient.js index 5fc7bc7..2c6d944 100644 --- a/lib/mqtt/mqttClient.js +++ b/lib/mqtt/mqttClient.js @@ -79,7 +79,7 @@ const mqttClient = function (events) { logger.info('LR temp:', this.livingRoom.temp); events.emit('sendIFTTT', mode); - const data = {id: 'temperature', data: {mode: mode, temp: this.livingRoom.temp}}; + const data = {id: 'temperature', data: {mode: globalMode, temp: this.livingRoom.temp}}; events.emit('sendSocket', data); setTimeout(this.fanTimer.bind(this), mod + 10); @@ -122,7 +122,7 @@ const mqttClient = function (events) { const d = new Date(); this.lastMsg = d.getTime(); - const data = {id: 'temperature', data: {mode: mode, temp: this.livingRoom.temp}}; + const data = {id: 'temperature', data: {mode: globalMode, temp: this.livingRoom.temp}}; events.emit('sendSocket', data); }.bind(this));