Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a workaround for minutely precipitation #344

Merged
merged 1 commit into from
Oct 2, 2020

Conversation

Tobiaqs
Copy link
Contributor

@Tobiaqs Tobiaqs commented Oct 1, 2020

This PR adds a workaround that stores precipitation data from minutely forecast. A onecall JSON response that contains a minutely array uses the precipitation key instead of rain (to save on data) looks like this:

{
  "minutely": [{ "precipitation": 0.443, "dt": 1601552873 }, ...],
  ...
}

This solution takes the precipitation field and copies it to the rain field if rain wasn't already set. The result is that the precipitation data ends up in the rain field encapsulated in a dict like: { 'all': <precipitation_value> }.

Fixes #343

data not being stored in Weather objects
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.

None yet

2 participants