Skip to content

Commit

Permalink
Add a workaround for minutely precipitation
Browse files Browse the repository at this point in the history
data not being stored in Weather objects
  • Loading branch information
Tobiaqs committed Oct 1, 2020
1 parent 2b2ba96 commit 6e23e8a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pyowm/weatherapi25/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ def from_dict(cls, the_dict):
elif 'all' in the_dict['clouds']:
clouds = the_dict['clouds']['all']

# -- precipitation workaround
if 'precipitation' in the_dict and 'rain' not in the_dict:
the_dict['rain'] = the_dict['precipitation']

# -- rain
rain = dict()
if 'rain' in the_dict:
Expand Down

0 comments on commit 6e23e8a

Please sign in to comment.