mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 20:22:53 +00:00
updated weather icon display
This commit is contained in:
parent
2dfb349609
commit
d6a6a53623
@ -132,11 +132,15 @@ WeatherProvider.register("openweathermap", {
|
|||||||
// specify date
|
// specify date
|
||||||
weather.date = moment(forecast.dt, "X");
|
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);
|
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
|
// the same day as before
|
||||||
// add values from forecast to corresponding variables
|
// add values from forecast to corresponding variables
|
||||||
minTemp.push(forecast.main.temp_min);
|
minTemp.push(forecast.main.temp_min);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user