FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
197 stars 13 forks source link

Evaporation sensor not working #150

Closed tefracky closed 1 month ago

tefracky commented 1 month ago

Version of home_assistant

2024.8.3

Version of the custom_component

2.1.10

Describe the bug

Error adding entity sensor.zu_hause_verdunstung_in_den_nachsten_24_stunden for domain sensor with platform dwd_weather Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 598, in _async_add_entities await coro File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 912, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1366, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1005, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1130, in _async_write_ha_state self.async_calculate_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1071, in async_calculate_state if extra_state_attributes := self.extra_state_attributes: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dwd_weather/sensor.py", line 442, in extra_state_attributes attributes["data"] = self._connector.get_evaporation_daily() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dwd_weather/connector.py", line 649, in get_evaporation_daily timestamp = datetime( ^^^^^^^^^ ValueError: day is out of range for month

Debug log

home-assistant_dwd_weather_2024-09-24T12-40-39.836Z.log

FL550 commented 1 month ago

Thanks for reporting, this is fixed now in version 2.1.11.

tefracky commented 1 month ago

The error message is gone, but the sensor still does not have a value:

grafik grafik

FL550 commented 1 month ago

It might be, that your station doesn't provide these values. I'll check this

FL550 commented 1 month ago

I can't reproduce this, but maybe that's because I have changed the parsing mechanism already. Can you please check if it's still missing in 2.1.12?

osswaldo commented 1 month ago

In 2.1.12, using hourly updates the attributes for the evaporation sensor are still null. For the "normal" update rate, the current value is still "unknown", but the values for the next days are not null.

Hourly: {EBEC7768-446F-4AF3-AFDC-92FC01B2512D}

Normal: {BCED032D-8975-4D79-B791-20F1886642A6}

FL550 commented 1 month ago

In the hourly data the evaporation data is not provided by DWD. I removed the sensor from the hourly data in v2.1.13 therefore.