Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[weather] openmeteo hourly does not work into next day #3449

Open
khassel opened this issue May 13, 2024 · 0 comments
Open

[weather] openmeteo hourly does not work into next day #3449

khassel opened this issue May 13, 2024 · 0 comments

Comments

@khassel
Copy link
Collaborator

khassel commented May 13, 2024

Now with local time 0:05 everything works as expected.

With local time 23:05 the hourly weather forecast is empty.

                const hours = [];
                const now = moment();

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

Did this ever work? The if statement is always true (when running 23:05) so nothing is added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants