FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
194 stars 12 forks source link

Unable to prepare setup for platform dwd_weather.sensor in HA 0.115.0b0 #7

Closed VDRainer closed 4 years ago

VDRainer commented 4 years ago

Version of the custom_component

v1.1.4

Describe the bug

Seeing the following errors on HA start. I have not enabled any of the additional sensors and the weather integration seems to work as expected.

Debug log


2020-09-08 01:57:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform dwd_weather.sensor: Platform not found (cannot import name 'UNIT_PERCENTAGE' from 'homeassistant.const' (/srv/ha/lib/python3.8/site-packages/homeassistant/const.py)).
2020-09-08 01:57:07 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform dwd_weather.sensor: Platform not found (cannot import name 'UNIT_PERCENTAGE' from 'homeassistant.const' (/srv/ha/lib/python3.8/site-packages/homeassistant/const.py)).
FL550 commented 4 years ago

Ok, then maybe they removed this from home_assistant. I relased v1.1.5 which fixes this error. Thanks for the issue!

S-Przybylski commented 4 years ago

After the update i got this error:

2020-09-08 11:56:43 ERROR (MainThread) [homeassistant.components.weather] Error while setting up dwd_weather platform for weather
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 201, in _async_setup_platform
    await asyncio.gather(*pending)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 310, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 481, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 522, in add_to_platform_finish
    self.async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
    self._async_write_ha_state()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 322, in _async_write_ha_state
    attr.update(self.state_attributes or {})
  File "/usr/src/homeassistant/homeassistant/components/weather/__init__.py", line 144, in state_attributes
    if self.temperature is not None:
  File "/config/custom_components/dwd_weather/weather.py", line 70, in temperature
    return self._connector.get_temperature()
  File "/config/custom_components/dwd_weather/connector.py", line 117, in get_temperature
    self.dwd_weather.get_forecast_data(
TypeError: unsupported operand type(s) for -: 'NoneType' and 'float'
S-Przybylski commented 4 years ago

Dear @FL550 could you please check again?

FL550 commented 4 years ago

I'm on it. I'll write if it's fixed.

FL550 commented 4 years ago

Should be fixed now. Can you confirm this?

S-Przybylski commented 4 years ago

Dear @FL550 the patch 1.1.7 fixed my issue! Thank you very much!

FL550 commented 4 years ago

Great!