csparpa / pyowm

A Python wrapper around the OpenWeatherMap web API
https://pyowm.readthedocs.io
MIT License
789 stars 171 forks source link

Precipitation from minutely forecast is not stored in Weather #343

Closed Tobiaqs closed 3 years ago

Tobiaqs commented 3 years ago

One-call JSON response (for locations that support minutely forecasts) looks like this:

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

All objects in the minutely array are parsed using Weather.from_dict but this ignores the precipitation field.

Possible solution: if precipitation is in the input of Weather.from_dict, set the rain field to { "1m": the_dict['precipitation'] }

csparpa commented 3 years ago

Bad luck!! :-Z Can you submit a PR about it?

Tobiaqs commented 3 years ago

Will do soon!

Tobiaqs commented 3 years ago

PR created. Could you give us an ETA for when this will reach master?

csparpa commented 3 years ago

Tomorrow, reasonably!

csparpa commented 3 years ago

Fixed with #344

csparpa commented 3 years ago

@Tobiaqs 3.1.1 is on PyPi --> you owe me a beer ;-) hope this is helpful!

Tobiaqs commented 3 years ago

Awesome, thanks a lot!