diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ec9e14..2b9d658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -273,4 +273,8 @@ * Fixed crash when an error occurs in OpenWeatherMap report * Fixed undefined rain boolean sensor value * Fixed several Tempest weather station issues -* Improved usage of converter \ No newline at end of file +* Improved usage of converter + +## 3.3.3 +* Fix Tempest weather station breakage introduced in 3.3.2 +* Fix Rain accumulation diff --git a/apis/weatherflow.js b/apis/weatherflow.js index d11c232..219e2a1 100755 --- a/apis/weatherflow.js +++ b/apis/weatherflow.js @@ -218,15 +218,15 @@ class TempestAPI that.rainAccumulation[currentObservationMinute] += mmOfRainInLastMinute; else { // Erase the minutes between last recorded minute and current minute - for (var i = that.rainAccumulationMinute; (i % 60) != currentObservationMinute; i++) + for (var i = that.rainAccumulationMinute + 1; (i % 60) != currentObservationMinute; i++) that.rainAccumulation[i % 60] = 0; that.rainAccumulation[currentObservationMinute] = mmOfRainInLastMinute; } that.rainAccumulationMinute = currentObservationMinute; - accumulation = converter.getRainAccumulated(that.rainAccumulation) + var accumulation = converter.getRainAccumulated(that.rainAccumulation) - this.log.debug("getHourlyAccumulatedRain last minute: " + mmOfRainInLastMinute + " last hour: " + accumulation); + this.log.debug("getHourlyAccumulatedRain last minute: " + mmOfRainInLastMinute + " rainAccumulation: " + this.rainAccumulation + " last hour: " + accumulation); return accumulation; } @@ -438,3 +438,4 @@ class TempestAPI module.exports = { TempestAPI: TempestAPI }; + diff --git a/package.json b/package.json index 595f0f4..fa7f654 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "homebridge-weather-plus", "displayName": "Weather Plus", - "version": "3.3.2", + "version": "3.3.3", "description": "A comprehensive weather plugin for homekit with current observations, forecasts and history.", "license": "MIT", "keywords": [