From c27c280a94dc363e52c568a625ddf846a7f7d75b Mon Sep 17 00:00:00 2001 From: mickey-mikey <149929346+mickey-mikey@users.noreply.github.com> Date: Fri, 10 Nov 2023 11:09:07 +1100 Subject: [PATCH] Fixing excessive log messages issue Changed "info" messages to "debug" as per https://github.com/bfishadow/homebridge-laser-egg/issues/11 --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 7a852d3..63304cb 100644 --- a/index.js +++ b/index.js @@ -66,7 +66,7 @@ function LaserEggAccessory(log, config) { LaserEggAccessory.prototype = { servicePolling: function() { - this.log.info('Laser Egg Polling...'); + this.log.debug('Laser Egg Polling...'); this.getObservation( function(p) { var that = this; @@ -97,7 +97,7 @@ LaserEggAccessory.prototype = { }, function(err, response, jsonObject) { if (!err && response.statusCode === 200 && String(jsonObject.id) === String(that.laser_egg_id)){ - that.log.info("Laser Egg PM2.5: %d, PM10: %d", jsonObject["info.aqi"]["data"]["pm25"], jsonObject["info.aqi"]["data"]["pm10"]); + that.log.debug("Laser Egg PM2.5: %d, PM10: %d", jsonObject["info.aqi"]["data"]["pm25"], jsonObject["info.aqi"]["data"]["pm10"]); that.airQualityService.setCharacteristic(Characteristic.StatusFault,0); if (jsonObject["info.aqi"]["data"].hasOwnProperty('pm25')) { that.airQualityService.setCharacteristic(Characteristic.PM2_5Density, jsonObject["info.aqi"]["data"]["pm25"]); @@ -114,7 +114,7 @@ LaserEggAccessory.prototype = { ); } var aqi = that.calcAQI(pm2_5); - that.log.info('Laser Egg AQI: %d', aqi); + that.log.debug('Laser Egg AQI: %d', aqi); callback(that.trans_aqi(aqi)); } );