Skip to content

Commit

Permalink
Merge pull request #23 from golles/precipitation_probability
Browse files Browse the repository at this point in the history
Fix: Forecast precipitation to precipitation probability
  • Loading branch information
golles authored Jun 4, 2022
2 parents cf84244 + fa97799 commit 2eb3db1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 3 additions & 3 deletions custom_components/knmi/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ATTR_FORECAST_TEMP,
ATTR_FORECAST_TEMP_LOW,
ATTR_FORECAST_TIME,
ATTR_FORECAST_PRECIPITATION,
ATTR_FORECAST_PRECIPITATION_PROBABILITY,
ATTR_FORECAST_WIND_BEARING,
ATTR_FORECAST_WIND_SPEED,
WeatherEntity,
Expand Down Expand Up @@ -119,7 +119,7 @@ def forecast(self):
if super().getData(f"d{i}tmax") is not None
else None
)
precipitation = (
precipitation_probability = (
float(super().getData(f"d{i}neerslag"))
if super().getData(f"d{i}neerslag") is not None
else None
Expand All @@ -139,7 +139,7 @@ def forecast(self):
ATTR_FORECAST_CONDITION: condition,
ATTR_FORECAST_TEMP_LOW: temp_low,
ATTR_FORECAST_TEMP: temp,
ATTR_FORECAST_PRECIPITATION: precipitation,
ATTR_FORECAST_PRECIPITATION_PROBABILITY: precipitation_probability,
ATTR_FORECAST_WIND_BEARING: wind_bearing,
ATTR_FORECAST_WIND_SPEED: wind_speed,
"sun_chance": sun_chance,
Expand Down
9 changes: 2 additions & 7 deletions hacs.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
{
"name": "knmi",
"hacs": "1.6.0",
"domains": [
"binary_sensor",
"sensor",
"switch"
],
"homeassistant": "0.118.0"
"homeassistant": "2022.2.0",
"render_readme": true
}

0 comments on commit 2eb3db1

Please sign in to comment.