-
-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Migrate OpenWeaterMap to new library (support API 3.0) #116870
Conversation
Hey there @fabaff, @nzapponi, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: J. Nick Koston <nick@koston.org>
I was hoping to be able to do another review pass on this before I'm flying all day tomorrow but it looks like the day got away from me. I'll be traveling for a week so I'll minimal time to look at this one. I'd like to try to get it merged before the 2024.6.x beta though given API 2.5 is going to go away. |
Co-authored-by: J. Nick Koston <nick@koston.org>
Thanks, have a nice trip :) |
I've marked this PR, as changes are requested that need to be processed. Thanks! 👍 ../Frenck |
yep, fixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @freekode
Tested, everything working. Migration to 3.0 successful |
Please update the breaking change section to tell users what they need to do. The target audience for breaking changes is the user consuming the change. This will get published nearly verbatim in the release notes. |
Added more info in PR description |
That implies that's a guarantee they won't be charged which we cannot make since OWM might change their policies. Suggested reword: OWM API v2.5 will be closed in June 2024. All OpenWeatherMap integrations must be migrated to mode (API) v3.0 to avoid service interruption. Before the migration, you must have an active subscription (be aware that subscription activation takes up to 2h). After the subscription is activated, users can migrate integrations to mode v3.0 via repair notification or manually via the integration configuration menu. The subscription has a free tier with 1000 calls/day. Consider setting the limit on the OpenWeatherMap website to stay under the threshold where API usage incurs a cost. |
Breaking change
Migration to new library with support of OneCall API (3.0).
OWM API v2.5 will be closed in June 2024. All OpenWeatherMap integrations must be migrated to mode (API) v3.0 to avoid service interruption.
Before the migration, you must have an active subscription (be aware that subscription activation takes up to 2h). After the subscription is activated, users can migrate integrations to mode v3.0 via repair notification or manually via the integration configuration menu.
The subscription has a free tier with 1000 calls/day. Consider setting the limit on the OpenWeatherMap website to stay under the threshold where API usage incurs a cost.
OpenWeatherMap official statement
Proposed change
Migrate new library
pyopenweathermap
I created specifically for Home Assistant. Currently, used pyowm library didn't have an update for a long time and seems dead.Remove forecast modes, one call allows to retrieve daily and hourly forecasts. Remove migration from V1 to V2 of config_flow, forecast mode isn't used anymore, there is no need for migration.
New lib https://github.com/freekode/pyopenweathermap
Type of change
Additional information
fixes APi 2.5 to be closed in June 2024 #115714
fixes New API keys for OpenWeatherMap OneCall do not work with API 2.5 #113000
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: