Skip to content

Commit

Permalink
check if data for probability_of_precipitation exists
Browse files Browse the repository at this point in the history
  • Loading branch information
toringer committed Sep 20, 2022
1 parent 51d6769 commit f7cbb29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion custom_components/met_next_6_hours_forecast/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ async def async_update(self):
native_precipitation=details["precipitation_amount"],
precipitation_probability=details[
"probability_of_precipitation"
],
]
if "probability_of_precipitation" in details
else None,
datetime=time,
condition=condition,
native_pressure=current["air_pressure_at_sea_level"],
Expand Down

0 comments on commit f7cbb29

Please sign in to comment.