Skip to content

Commit

Permalink
Fix weathergov api precipitationLastHour (#3125)
Browse files Browse the repository at this point in the history
Pull request fixes small big in weathergov api format mismatch #3124

---------

Co-authored-by: Karsten Hassel <hassel@gmx.de>
  • Loading branch information
JasonStieber and khassel authored Jun 28, 2024
1 parent 74c6bb3 commit c89c3ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Thanks to: @btoconnor, @bugsounet, @khassel, @kleinmantara and @WallysWellies.

- [calendar] Added config option "showEndsOnlyWithDuration" for default calendar
- [compliments] Added `specialDayUnique` config option, defaults to `false` (#3465)
- [weather] Provider weathergov: Use `precipitationLast3Hours` if `precipitationLastHour` is `null` (#3124)

### Removed

Expand Down
2 changes: 1 addition & 1 deletion modules/default/weather/providers/weathergov.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ WeatherProvider.register("weathergov", {
currentWeather.minTemperature = currentWeatherData.minTemperatureLast24Hours.value;
currentWeather.maxTemperature = currentWeatherData.maxTemperatureLast24Hours.value;
currentWeather.humidity = Math.round(currentWeatherData.relativeHumidity.value);
currentWeather.precipitationAmount = currentWeatherData.precipitationLastHour.value;
currentWeather.precipitationAmount = currentWeatherData.precipitationLastHour.value ? currentWeatherData.precipitationLastHour.value : currentWeatherData.precipitationLast3Hours.value;
if (currentWeatherData.heatIndex.value !== null) {
currentWeather.feelsLikeTemp = currentWeatherData.heatIndex.value;
} else if (currentWeatherData.windChill.value !== null) {
Expand Down

0 comments on commit c89c3ed

Please sign in to comment.