From 0ad45e7a549a6024a88d175a80f62861ebb6dd28 Mon Sep 17 00:00:00 2001 From: Brian O'Connor Date: Sat, 15 Jun 2024 09:29:49 -0400 Subject: [PATCH 1/2] Open-Meteo: Fix forecast and hourly weather to use real temperatures, not apparent temperatures --- modules/default/weather/providers/openmeteo.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/default/weather/providers/openmeteo.js b/modules/default/weather/providers/openmeteo.js index 5c4b232200..2cf2ee1800 100644 --- a/modules/default/weather/providers/openmeteo.js +++ b/modules/default/weather/providers/openmeteo.js @@ -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, currentWeather.isDayTime()); 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); From eb493ceef78b3394564a4e3921e664b2c2032949 Mon Sep 17 00:00:00 2001 From: veeck Date: Mon, 24 Jun 2024 22:09:49 +0200 Subject: [PATCH 2/2] Updat CHANGELOG --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cada597d3b..9443b6a711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,10 +27,11 @@ Thanks to: @kleinmantara (to be continued before release) ### Fixed -- Fix crash possibility if `module: ` is not defined and on `postion: ` misktake. +- [core] Fixed crash possibility if `module: ` is not defined and on `postion: ` misktake. - [weather] Fixed precipitationProbability in forecast for provider openmeteo (#3446) - [weather] Fixed type=daily for provider openmeteo having no data when running after 23:00 (#3449) - [weather] Fixed type=daily for provider openmeteo showing nightly icons in forecast when current time is "nightly" (#3458) +- [weather] Fixed forecast and hourly weather for provider openmeteo to use real temperatures, not apparent temperatures ## [2.27.0] - 2024-04-01