jdejaegh / irm-kmi-ha

Home Assistant weather provider using data from Belgian IRM KMI 🇧🇪 🇱🇺 🇳🇱
MIT License
40 stars 0 forks source link

Incorrect, shifted data after midnight #38

Closed patriiiiiiiiiick closed 2 months ago

patriiiiiiiiiick commented 3 months ago

I have observed incorrect data being displayed and a shift in the days, in the hour after midnight. I will try to take corresponding screenshots later, hopefully tonight. I am just giving you a head start, in case you want.

Could this be caused by daylight saving time?

jdejaegh commented 3 months ago

Thanks for the heads!

To be sure:

If you manage to take a screenshot, please enable the debug logging for the integration to get the raw JSON data as well.

Daylight saving time is not my main suspect on this. The logic to handle the data is probably where the bug is: their API does not put a timestamp on the hourly forecast, just the hour it is related to (i.e. 'hour'='18'). The midnight case looks like the perfect edge case for a bug like this.

I'll also try to capture this with a script tonight

jdejaegh commented 3 months ago

I managed to reproduce the error: when the current time is between midnight and 1 AM, all the hourly forecasts are shifted by +1 day.

jdejaegh commented 3 months ago

This is fixed and released with version 0.2.15. Other changes that require Home Assistant 2024.6 were released in the same version so it will only work with Home Assistant 2024.6 or newer

patriiiiiiiiiick commented 3 months ago

Updated yesterday and I still see the issue.

Screenshot_20240608-001925 Screenshot_20240608-001950

jdejaegh commented 2 months ago

Strange. I'll try to reproduce it. Did you check with the regular basic Lovelace if the behavior is buggy as well?

Edit: I think I understand why you still get that bug. I fixed the bug in the hourly forecast with #40, not in the daily forecast.

jdejaegh commented 2 months ago

The bug in daily forecast is fixed in 0.2.16

Thanks for your feedback on this issue. Feel free to comment here if you still encounter that bug (hopefully not)