Skip to content

feat: add Open-Meteo weather provider - #175

Merged
mattrossman merged 8 commits into
mattrossman:mainfrom
unki:feat/openmeteo-provider
Sep 20, 2026
Merged

mattrossman merged 8 commits into
mattrossman:mainfrom
unki:feat/openmeteo-provider

Conversation

@unki

@unki unki commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Add Open-Meteo as a third opt-in provider with their official forecast API.
Requests current temperature and UV (for #174) plus 24(+2) hourly temperature, precipitation probability.
Sun events, coordinates and city name reuse the base provider.

Not sure if I did that with the supabase migration correct though :)

Keyless, official forecast API as a third opt-in provider. Requests
current temperature and UV plus 26 hourly temperature, precipitation
probability and amount in the units the payload expects — two entries
more than the 24 displayed, so a truncated response does not fail the
refresh. A missing UV reading is reported as unknown rather than
failing the fetch. Sun events, coordinates and city name reuse the base
provider. Requested variables are listed in one place so further data
points are easy to add.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6aFbLnJqubbgaZL7f5NnU
@mattrossman

Copy link
Copy Markdown
Owner

Cool, I was interested in adding that provider! This will close #129.

I'll prob regenerate the migration to be safe, I use the Supabase CLI to generate it from the declarative schema.

Hopefully within the next few days I'll get a chance to stress test it myself.

Comment thread src/pkjs/weather/openmeteo.js Outdated
Comment thread src/pkjs/weather/openmeteo.js Outdated
this.startTime = hourly.time[0];
this.currentTemp = current.temperature_2m;
// Unknown rather than zero: 0 is a real UV reading.
this.uvIndex = isFiniteNumber(current.uv_index) ? current.uv_index : null;

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.

I'll probably omit this for now, and whichever PR ends up using UV can add it.

I've been playing with a UV index hourly trend in #170, which looks like this.

Image

@mattrossman

Copy link
Copy Markdown
Owner

Gave it a test drive today and working as expected!

I removed the UV index fetching for now and moved attribution to the settings page so it's visible for anyone who ends up selecting the provider.

Migration was generated correctly already 👍

@mattrossman
mattrossman merged commit 8377984 into mattrossman:main Sep 20, 2026
@mattrossman mattrossman mentioned this pull request Sep 20, 2026
mattrossman pushed a commit that referenced this pull request Sep 20, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.37.0](v1.36.0...v1.37.0)
(2026-09-20)


### Features

* add Open-Meteo weather provider
([#175](#175))
([8377984](8377984))

---
After merging this PR, wait for the Release Please workflow to finish
and upload `forecaswatch2.pbw` to the GitHub Release. Download that
asset, upload it to both the [Rebble Developer
Portal](https://dev-portal.rebble.io/) and [Pebble Developer
Dashboard](https://developer.repebble.com/dashboard), then add release
notes. Use the [existing RePebble
changelog](https://apps.repebble.com/forecaswatch-2_5dcdca6ac393f50cf6dbc264/changelog)
as the style reference.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@unki
unki deleted the feat/openmeteo-provider branch September 21, 2026 07:38
@unki

unki commented Sep 21, 2026

Copy link
Copy Markdown
Contributor Author

Awesome! Thank you @mattrossman 😊

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants