diff --git a/custom_components/met_next_6_hours_forecast/weather.py b/custom_components/met_next_6_hours_forecast/weather.py index 59ca285..e0a6d22 100755 --- a/custom_components/met_next_6_hours_forecast/weather.py +++ b/custom_components/met_next_6_hours_forecast/weather.py @@ -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"],