Skip to content

Add support for One Call 4.0 endpoint#22

Open
pike00 wants to merge 1 commit into
freekode:mainfrom
pike00:fix-v40-support
Open

Add support for One Call 4.0 endpoint#22
pike00 wants to merge 1 commit into
freekode:mainfrom
pike00:fix-v40-support

Conversation

@pike00

@pike00 pike00 commented Jul 16, 2026

Copy link
Copy Markdown

This PR adds support for the One Call 4.0 endpoint to resolve issues where new accounts cannot use the 3.0 endpoint. It updates the client factory to accept 'v4.0' and builds the correct URL for the One Call client.

@freekode

freekode commented Jul 17, 2026

Copy link
Copy Markdown
Owner

please rebase to fix tests
have you tested changes with Home Assistant?

def _get_url(self, lat, lon):
return (f"{API_URL}?"
api_url = 'https://api.openweathermap.org/data/3.0/onecall'
if getattr(self, 'api_version', None) == 'v4.0':

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can't be none, you can use normal self here

@pike00

pike00 commented Jul 17, 2026

Copy link
Copy Markdown
Author

please rebase to fix tests

Will do!

have you tested changes with Home Assistant?

Can do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants