another typo fix

This commit is contained in:
fwitte 2019-01-05 17:16:19 +01:00
parent 9cbf331533
commit bdcc0c5373

View File

@ -156,10 +156,17 @@ WeatherProvider.register("openweathermap", {
// add values from first forecast of this day to corresponding variables
minTemp.push(forecast.main.temp_min);
maxTemp.push(forecast.main.temp_max);
if (forecast.hasOwnProperty("rain")) {
if (this.config.units === "imperial" && !isNaN(forecast.rain["3h"])) {
rain += forecast.rain["3h"] / 25.4;
} else if (!isNaN(forecast.rain["3h"])){
rain += forecast.rain["3h"];
} else {
rain += 0;
}
} else {
rain += 0;
}
}
}