FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
188 stars 12 forks source link

Hourly Forecast not updated/refreshed in cards #117

Closed somansch closed 8 months ago

somansch commented 8 months ago

Version of home_assistant

Core 2024.1.2 Supervisor 2023.12.0 Operating System 11.4 Frontend 20240104.0

Version of the custom_component

v2.1.0

Describe the bug

I'm using the hourly forecast info inside custom:hourly-weather card. It's shown on a info display on the main dashboard. I've identified, that it's not updating the content inside the card automatically. I've done some testing to identify the root cause. So, I created one dashboard to show in parallel two different cards (the builtin "weather-forecast" and "custom:hourly-weather) and also two different weather entities ("DWD" and "OpenWeatherMap") + the actual time:

2024-01-10_11-27-08

After one hour, only the content of "OpenWeatherMap" is updated automatically in both cards:

2024-01-10_12-15-40

You need to refresh/reload the page on the affected device or any other device to get the data updated:

2024-01-10_12-16-05
FL550 commented 8 months ago

Hm, strange. I'll look into this tomorrow.

Thanks for reporting!

FL550 commented 8 months ago

This is now hopefully fixed. Can you please confirm this?

somansch commented 8 months ago

Thanks for your fast take on this. I just tested v2.1.1. Unfortunately, no change in this behavior. If you test a fix, it's important that you have not opened another browser or app with HA as this will trigger an update.

Failure404 commented 8 months ago

I don't know if the problem I am experiencing relates to this thread here, but I am using the same hourly weather card and I am getting lots of "days_from_today must be between 0 and 2" error messages in the HA log when the card gets loaded. However, the card looks perfectly fine and shows what it is supposed to show. This error only appears when using the DWD weather entity, other weather providers don't generate that error.

FL550 commented 8 months ago

@Failure404 days_from_today is not an attribute which is specified in a weather entity: link, so I don't know where this is coming from.

FL550 commented 8 months ago

I think I have found the issue. However this needs probably done time, because I have to rework the data update mechanism. I'll keep you informed.

FL550 commented 8 months ago

Found the issue and implemented a fix. New version is out.

somansch commented 8 months ago

Thanks! Just tested the new version and I can confirm - it's fixed.