Skip to content

Fetch weather from Open-Meteo outside the US - #52

Closed
A-nony-mous wants to merge 2 commits into
jimrandomh:mainfrom
A-nony-mous:pr/weather-international
Closed

A-nony-mous wants to merge 2 commits into
jimrandomh:mainfrom
A-nony-mous:pr/weather-international

Conversation

@A-nony-mous

@A-nony-mous A-nony-mous commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #50

Split weather fetching into providers behind one interface and add Open-Meteo as the default — worldwide coverage, no account, no API key. NWS stays selectable: inside the US it still reports measurements from local stations, which Open-Meteo only offers as a model forecast. A Weather settings section picks the provider and the display unit (°C default); the status bar and system card follow that unit too.

Weather app (Singapore) Status bar in °C
Weather app Status bar

Tests: tests/weather-providers.test.cjs (new) covers both providers' parsing and unit conversions; tests/weather.test.cjs extends the status-bar assertion to both units. Verified live against api.open-meteo.com (Singapore / Sydney / New York) and on a phone outside the US, screenshots above.

ps: I do not live in US so I do not know what it look like before.

Split fetching into providers behind one interface and add Open-Meteo,
which needs no account or API key, as the default; NWS stays selectable.
A Weather settings section picks the provider and the display unit.
The status bar and system card always rendered Fahrenheit, ignoring the
weather.unit setting; pick the field from the state's display unit.
@jimrandomh

Copy link
Copy Markdown
Owner

I prompted my agent to add international-weather support before I saw this; it also chosen open-meteo. Then after merge I opened the PRs list and saw that it was a duplicate. Oh well, tokens are cheap; I'll take this PR as validation that open-meteo was a good choice.

@jimrandomh jimrandomh closed this Oct 23, 2026
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.

International Weather support request

2 participants