home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Migrate OpenWeaterMap to new library (support API 3.0) #116870

Open freekode opened 1 week ago

freekode commented 1 week ago

Breaking change

Migration to new library with support of OneCall API (3.0)

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

Checklist

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

To help with the load of incoming pull requests:

home-assistant[bot] commented 1 week ago

Hey there @fabaff, @nzapponi, mind taking a look at this pull request as it has been labeled with an integration (openweathermap) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `openweathermap` can trigger bot actions by commenting: - `@home-assistant close` Closes the pull request. - `@home-assistant rename Awesome new title` Renames the pull request. - `@home-assistant reopen` Reopen the pull request. - `@home-assistant unassign openweathermap` Removes the current integration label and assignees on the pull request, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.
bdraco commented 1 week ago

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.

bdraco commented 6 days ago

Tested. Everything looks good.

Was able to switch from v2.5 to v3.0 and back.

Screenshot 2024-05-12 at 1 40 53 PM Screenshot 2024-05-12 at 1 40 58 PM
bdraco commented 6 days ago

I'm still traveling until Thursday, but I wanted to give you feedback on the issue so we can be sure to get it in before beta.

freekode commented 6 days ago

I'm still traveling until Thursday, but I wanted to give you feedback on the issue so we can be sure to get it in before beta.

Thanks, have a nice trip :)

frenck commented 7 hours ago

I've marked this PR, as changes are requested that need to be processed. Please un-draft it once it is ready for review again by clicking the "Ready for review" button.

Thanks! 👍

../Frenck

Learn more about our pull request process.