Skip to content

fix: report today's total rainfall in !wx, not the last hour - #18

Merged
sg merged 1 commit into
mainfrom
fix/wx-rain-total
Jun 15, 2026
Merged

sg merged 1 commit into
mainfrom
fix/wx-rain-total

Conversation

@sg

@sg sg commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Problem

!wx <city> reported Rain: 0.0in even after inches had fallen. The script read Open-Meteo's current.precipitation, which is only the preceding hour's total — so once the rain stops it reads 0, regardless of earlier rainfall. Not an Open-Meteo bug; the wrong field/window was requested.

Live confirmation for Bee Cave (30.30854, −97.94501): current.precipitation = 0.0in while daily.precipitation_sum[today] = 0.425in (7 rainy hours).

Fix

commands/wx.py now requests daily=precipitation_sum with timezone=auto and reports today's accumulated, local-day total as "Rain" (with an n/a fallback). Dropped precipitation from the current block.

Verified live:

  • !wx bee cave → Rain: 0.425in (was 0.0in)
  • !wx Austin US → Rain: 0.862in

Caveat

precipitation_sum is a modeled gridded estimate — much better than the old 0.0, but it can still undercount very localized heavy downpours vs a physical gauge (that's what !pws is for).

@sg
sg merged commit 180fd47 into main Jun 15, 2026
1 check passed
@sg
sg deleted the fix/wx-rain-total branch June 15, 2026 13:16
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.

1 participant