mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-21 12:55:22 +00:00
weather module adjustments for rain and snow
This commit is contained in:
@@ -49,7 +49,7 @@ Module.register("weather",{
|
||||
tableClass: "small",
|
||||
|
||||
onlyTemp: false,
|
||||
showRainAmount: true,
|
||||
showPrecipitationAmount: false,
|
||||
colored: false,
|
||||
showFeelsLike: true
|
||||
},
|
||||
@@ -200,8 +200,8 @@ Module.register("weather",{
|
||||
value += "K";
|
||||
}
|
||||
}
|
||||
} else if (type === "rain") {
|
||||
if (isNaN(value) || value === 0) {
|
||||
} else if (type === "precip") {
|
||||
if (isNaN(value) || value === 0 || value.toFixed(2) === "0.00") {
|
||||
value = "";
|
||||
} else {
|
||||
value = `${value.toFixed(2)} ${this.config.units === "imperial" ? "in" : "mm"}`;
|
||||
|
Reference in New Issue
Block a user