mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-27 19:53:36 +00:00
weatherforecast rainfall rounding
This commit is contained in:
parent
439027220b
commit
6598ae080f
@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
- Hungarian translation for "Feels" and "Week"
|
||||
- Spanish translation for "Feels"
|
||||
- Add classes instead of inline style to the message from the module Alert
|
||||
- Fix for weatherforecast rainfall rounding [#1374](https://github.com/MichMich/MagicMirror/issues/1374)
|
||||
|
||||
### Fixed
|
||||
- Mixup between german and spanish translation for newsfeed.
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user