Skip to content

Commit

Permalink
Fix bad None weather_code (#37)
Browse files Browse the repository at this point in the history
* Fix bad None weather_code

* manifest fix
  • Loading branch information
GuyKh authored May 15, 2023
1 parent 4bd5a1d commit 0c6034b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/ims/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"iot_class": "cloud_polling",
"issue_tracker": "https://github.com/t0mer/ims-custom-component/issues",
"requirements": ["weatheril>=0.29.1"],
"version": "0.1.9"
"version": "0.1.9b"
}
2 changes: 1 addition & 1 deletion custom_components/ims/weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def forecast(self):
).isoformat(),
ATTR_FORECAST_NATIVE_TEMP: hourly_forecast.temperature,
ATTR_FORECAST_NATIVE_TEMP_LOW: entry.minimum_temperature,
ATTR_FORECAST_CONDITION: WEATHER_CODE_TO_CONDITION[str(last_weather_code)],
ATTR_FORECAST_CONDITION: WEATHER_CODE_TO_CONDITION[last_weather_code],
ATTR_FORECAST_NATIVE_PRECIPITATION: hourly_forecast.rain,
ATTR_FORECAST_WIND_BEARING: WIND_DIRECTIONS[hourly_forecast.wind_direction_id],
ATTR_FORECAST_PRECIPITATION_PROBABILITY: hourly_forecast.rain_chance,
Expand Down

0 comments on commit 0c6034b

Please sign in to comment.