mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-08-22 21:11:17 +00:00
Open-Meteo: Fix forecast and hourly weather to use real temperatures, not apparent temperatures (#3468)
As discussed in #3466, the Open-Meteo provider is using the apparent temperature ("Feels like") in the forecast and hourly weather reporting. This is contrary to expected behavior. Note: I'm a little unclear on how I should be editing the `CHANGELOG.md` file with this PR - happy to update this PR with a little guidance. This is my first attempted PR in this project. Let me know if there are any questions. --------- Co-authored-by: veeck <michael.veeck@nebenan.de>
This commit is contained in:
@@ -398,9 +398,9 @@ WeatherProvider.register("openmeteo", {
|
||||
currentWeather.windFromDirection = weather.winddirection_10m_dominant;
|
||||
currentWeather.sunrise = weather.sunrise;
|
||||
currentWeather.sunset = weather.sunset;
|
||||
currentWeather.temperature = parseFloat((weather.apparent_temperature_max + weather.apparent_temperature_min) / 2);
|
||||
currentWeather.minTemperature = parseFloat(weather.apparent_temperature_min);
|
||||
currentWeather.maxTemperature = parseFloat(weather.apparent_temperature_max);
|
||||
currentWeather.temperature = parseFloat((weather.temperature_2m_max + weather.temperature_2m_min) / 2);
|
||||
currentWeather.minTemperature = parseFloat(weather.temperature_2m_min);
|
||||
currentWeather.maxTemperature = parseFloat(weather.temperature_2m_max);
|
||||
currentWeather.weatherType = this.convertWeatherType(weather.weathercode, true);
|
||||
currentWeather.rain = parseFloat(weather.rain_sum);
|
||||
currentWeather.snow = parseFloat(weather.snowfall_sum * 10);
|
||||
@@ -432,9 +432,9 @@ WeatherProvider.register("openmeteo", {
|
||||
currentWeather.windFromDirection = weather.winddirection_10m;
|
||||
currentWeather.sunrise = weathers.daily[h].sunrise;
|
||||
currentWeather.sunset = weathers.daily[h].sunset;
|
||||
currentWeather.temperature = parseFloat(weather.apparent_temperature);
|
||||
currentWeather.minTemperature = parseFloat(weathers.daily[h].apparent_temperature_min);
|
||||
currentWeather.maxTemperature = parseFloat(weathers.daily[h].apparent_temperature_max);
|
||||
currentWeather.temperature = parseFloat(weather.temperature_2m);
|
||||
currentWeather.minTemperature = parseFloat(weathers.daily[h].temperature_2m_min);
|
||||
currentWeather.maxTemperature = parseFloat(weathers.daily[h].temperature_2m_max);
|
||||
currentWeather.weatherType = this.convertWeatherType(weather.weathercode, currentWeather.isDayTime());
|
||||
currentWeather.humidity = parseFloat(weather.relativehumidity_2m);
|
||||
currentWeather.rain = parseFloat(weather.rain);
|
||||
|
Reference in New Issue
Block a user