briis / smartweather

WeatherFlow Smart Weather Component for Home Assistant
MIT License
108 stars 11 forks source link

No entities after upgrading to 2.0.2, possible rest error. #39

Closed niemyjski closed 4 years ago

niemyjski commented 4 years ago

I followed the upgrade steps to a T and I don't have any entities I've tried every configuration option using add new integration and it always ends up with:

image

The only thing I see in the logs is the following error. I'm using the standard API Key with station id 22980

2020-09-30 07:55:56 ERROR (MainThread) [custom_components.smartweather] Unexpected error fetching smartweather data: 'precip_icon'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 143, in async_refresh
    self.data = await self._async_update_data()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 131, in _async_update_data
    return await self.update_method()
  File "/usr/local/lib/python3.8/site-packages/pysmartweatherio/client.py", line 99, in get_hourly_forecast
    return await self._forecast_data(FORECAST_TYPE_HOURLY, 72)
  File "/usr/local/lib/python3.8/site-packages/pysmartweatherio/client.py", line 321, in _forecast_data
    "precip_icon": row["precip_icon"],
KeyError: 'precip_icon'
briis commented 4 years ago

Thanks for the feedback. I can confirm that I can replicate that. It seems like a specific data point is missing in some data sets. Try and shift Forecast to Daily for now, that should work, and then I will work on the other parts.

briis commented 4 years ago

Hi @niemyjski This is now fixed. V2.0.3 should show in HACS shortly, and after installing and restarting, it should work, also with hourly forecasts. If you can confirm this, please close this issue.

niemyjski commented 4 years ago

Fixed thank you