-
Notifications
You must be signed in to change notification settings - Fork 3
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
Going backwards? #18
Comments
@kds69 you're absolutely right. There were a few unintended regressions with the release. I wanted to refactor the code a bit and then re-integrate the changes you made, but I completely forgot about the latter... Just to clarify one thing though: up until this release the integration was using v1 of the srf meteo api. This version is deprecated and will stop working sooner or later, so the main point of this release was actually to move to the new v2 api. |
Btw, the no hourly might have something to do with the new home assistant weather entity. The forecast is no longer exposed as an attribute (that's deprecated) and instead you provide two methods for consumers to get the hourly and daily forecast separately. If you use the default weather card and switch it to "hourly forecast" you should be able to see this. Can you confirm that this aligns with what you're seeing, @kds69 ? |
@siku2 thanks for the explanation. |
That's what I'm saying, it's no longer an attribute. You can't see it in the debug view. I'm surprised by this as well. |
Just saw that the new HA version 2023.09 was released today. Be sure to try it out, @kds69. The changes to the forecast system are fully implemented now. |
you are absolutely right. There was indeed a timing issue in the various migrations (my HA got totally instable for 24h). (I am playing around with irrandiance to create my own solar forecast... which btw is now a bit cumbersome with weather data being in cache =I'll have to create automation to call a service to populate a specific irradiance sensor. There is even a petition open to roll back this new way to manage weather entities. Sooner or later, solar forecast will move to cache as well I presume. Not my battle). |
yes, that's what I was referring to in my original reply. I didn't actually intend on removing those, but I completely forgot to add them back after the tedious process of refactoring the code :)
I know where you're coming from, but give it some time. Btw, I'm more than happy to add a separate sensor for this to the integration as well. I have my own irradiance sensor, so I never really required it from an api, but it never hurts to have multiple options :) |
Alright, I went ahead and added the missing fields real quick. Before I release it, mind giving feedback if this is what you wanted, @kds69? hass-srf-weather/custom_components/srf_weather/weather.py Lines 210 to 224 in 93bc29f
These fields will be available in the forecast as well as in the attributes of the weather entity. |
yes! |
The trick is this part here: hass-srf-weather/custom_components/srf_weather/weather.py Lines 147 to 152 in 93bc29f
all the keys that are part of the "srf extra" set are copied over to the extra state attributes. |
wow! |
Still a little issue: 3-hours forecasts are loaded as hourly. Also realizing scan interval is too short: 15mn = api used 96x a day > 50x for freemium… may this be every 30mn, which is more than decent obviously |
No, hass only supports hourly, twice-daily, and daily forecasts. Additionally, I can add an additional key to the forecasts indicating whether it's a 1 or 3 hour one.
That's not what's happening. The integration is updating its internal state every 15 minutes, yes, but the actual API requests are performed based on the rate limits reported by the API. The logic for this is here: hass-srf-weather/custom_components/srf_weather/coordinator.py Lines 30 to 48 in 8d96dbe
|
ok |
Hi,
The latest version has now regressed partially: no hourly, no detail next 3 days...
API 2.0 was working already for me. Am I missing a point with this release?
Please let me know.
The text was updated successfully, but these errors were encountered: