Skip to content

Commit

Permalink
fixed type=daily for provider openmeteo having no data when running a…
Browse files Browse the repository at this point in the history
…fter 23:00
  • Loading branch information
khassel committed May 19, 2024
1 parent d1c17e7 commit 8b87b72
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 @@ -20,6 +20,7 @@ _This release is scheduled to be released on 2024-07-01._
### Fixed

- [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)

## [2.27.0] - 2024-04-01

Expand Down
2 changes: 1 addition & 1 deletion modules/default/weather/providers/openmeteo.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ WeatherProvider.register("openmeteo", {
const now = moment();

weathers.hourly.forEach((weather, i) => {
if ((hours.length === 0 && weather.time.hour() <= now.hour()) || hours.length >= this.config.maxEntries) {
if ((hours.length === 0 && weather.time <= now) || hours.length >= this.config.maxEntries) {
return;
}

Expand Down

0 comments on commit 8b87b72

Please sign in to comment.