weather module: Fixed precipitationProbability in forecast … (#3448)

…for provider openmeteo, fixed #3446
This commit is contained in:
Karsten Hassel 2024-05-13 22:36:35 +02:00 committed by GitHub
parent 3b0035760d
commit d1c17e7fc0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -19,6 +19,8 @@ _This release is scheduled to be released on 2024-07-01._
### Fixed
- [weather] Fixed precipitationProbability in forecast for provider openmeteo (#3446)
## [2.27.0] - 2024-04-01
Thanks to: @bugsounet, @crazyscot, @illimarkangur, @jkriegshauser, @khassel, @KristjanESPERANTO, @Paranoid93, @rejas, @sdetweil and @vppencilsharpener.

View File

@ -405,7 +405,7 @@ WeatherProvider.register("openmeteo", {
currentWeather.rain = parseFloat(weather.rain_sum);
currentWeather.snow = parseFloat(weather.snowfall_sum * 10);
currentWeather.precipitationAmount = parseFloat(weather.precipitation_sum);
currentWeather.precipitationProbability = parseFloat(weather.precipitation_probability);
currentWeather.precipitationProbability = parseFloat(weather.precipitation_hours * 100 / 24);
currentWeather.uv_index = parseFloat(weather.uv_index_max);
days.push(currentWeather);