Repository navigation
Fetch weather from Open-Meteo outside the US - #52
Closed
A-nony-mous wants to merge 2 commits into
Closed
A-nony-mous wants to merge 2 commits into
A-nony-mous wants to merge 2 commits into
Conversation
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.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Tests:
tests/weather-providers.test.cjs(new) covers both providers' parsing and unit conversions;tests/weather.test.cjsextends 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.