mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 05:07:05 +00:00
weatherforecast rainfall rounding
This commit is contained in:
@@ -177,7 +177,7 @@ Module.register("weatherforecast",{
|
||||
rainCell.innerHTML = "";
|
||||
} else {
|
||||
if(config.units !== "imperial") {
|
||||
rainCell.innerHTML = forecast.rain + " mm";
|
||||
rainCell.innerHTML = parseFloat(forecast.rain).toFixed(1) + " mm";
|
||||
} else {
|
||||
rainCell.innerHTML = (parseFloat(forecast.rain) / 25.4).toFixed(2) + " in";
|
||||
}
|
||||
@@ -350,7 +350,7 @@ Module.register("weatherforecast",{
|
||||
icon: this.config.iconTable[forecast.weather[0].icon],
|
||||
maxTemp: this.roundValue(forecast.temp.max),
|
||||
minTemp: this.roundValue(forecast.temp.min),
|
||||
rain: this.roundValue(forecast.rain)
|
||||
rain: forecast.rain
|
||||
};
|
||||
|
||||
this.forecast.push(forecastData);
|
||||
|
Reference in New Issue
Block a user