Repository navigation
fix: report today's total rainfall in !wx, not the last hour - #18
Merged
Merged
Conversation
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.
Problem
!wx <city>reportedRain: 0.0ineven after inches had fallen. The script read Open-Meteo'scurrent.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.0inwhiledaily.precipitation_sum[today] = 0.425in(7 rainy hours).Fix
commands/wx.pynow requestsdaily=precipitation_sumwithtimezone=autoand reports today's accumulated, local-day total as "Rain" (with ann/afallback). Droppedprecipitationfrom thecurrentblock.Verified live:
!wx bee cave→Rain: 0.425in(was0.0in)!wx Austin US→Rain: 0.862inCaveat
precipitation_sumis a modeled gridded estimate — much better than the old0.0, but it can still undercount very localized heavy downpours vs a physical gauge (that's what!pwsis for).