X-Git-Url: https://git.toastfreeware.priv.at/chrisu/seepark.git/blobdiff_plain/3f3b346ada7cf690fb3f852aff925d740b288128..14282c08d2323bff66e470fa9bbc9d00c1004c07:/owm.py diff --git a/owm.py b/owm.py index 74fe6c4..d97d57e 100755 --- a/owm.py +++ b/owm.py @@ -52,7 +52,7 @@ def extractweatherdata(w): data['winddegrees'] = w['wind']['deg'] if 'deg' in w['wind'] else math.nan data['winddirection'] = degToCompass(data['winddegrees']) - data['precipitation'] = w['rain']['3h'] if 'rain' in w else math.nan + data['precipitation'] = w['rain']['3h'] if 'rain' in w and w['rain'].get('3h') else math.nan data['visibility'] = w.get('visibility', math.nan) return data