diff --git a/lib/mqtt/mqttClient.js b/lib/mqtt/mqttClient.js index 886fc14..8dee6b7 100644 --- a/lib/mqtt/mqttClient.js +++ b/lib/mqtt/mqttClient.js @@ -88,16 +88,14 @@ const mqttClient = function(events) { let n; const now = new Date; - //const mod = 900000 - (now.getTime() % 900000); - const mod = 120000 - (now.getTime() % 120000); + const mod = 900000 - (now.getTime() % 900000); const day = now.getDay(); const daytimeLimits = {low: 27900000, high: 63000000}; const nowMS = (now.getHours() * 3600000) + (now.getMinutes() * 60000); if (globalMode === 'FanOff') { logger.info('Fans off, temp should be <= 19.5'); - // mode = (parseFloat(this.livingRoom.temp) <= 19.5) ? 'FanOn' : 'FanOff'; - mode = (parseFloat(this.livingRoom.temp) <= 20.5) ? 'FanOn' : 'FanOff'; + mode = (parseFloat(this.livingRoom.temp) <= 19.5) ? 'FanOn' : 'FanOff'; } else { logger.info('Fans on, temp should not be less than 22.5'); mode = (parseFloat(this.livingRoom.temp) <= 22.5) ? 'FanOn' : 'FanOff';