updated weather icon display

This commit is contained in:
fwitte 2019-02-14 16:48:45 +01:00
parent 2dfb349609
commit d6a6a53623

View File

@ -132,10 +132,14 @@ WeatherProvider.register("openweathermap", {
// specify date
weather.date = moment(forecast.dt, "X");
// select weather type by first forecast value of a day, is this reasonable?
// If the first value of today is later than 17:00, we have an icon at least!
weather.weatherType = this.convertWeatherType(forecast.weather[0].icon);
}
if (moment(forecast.dt, "X").format("H") >= 8 && moment(forecast.dt, "X").format("H") <= 17) {
weather.weatherType = this.convertWeatherType(forecast.weather[0].icon);
}
// the same day as before
// add values from forecast to corresponding variables