FL550 / dwd_weather

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

Error doing job: Task exception was never retrieved (None) #149

Closed anticharm01 closed 1 week ago

anticharm01 commented 1 week ago

After the latest plugin upgrade I see an error message in the home assistant core log.

Version of home_assistant

24.9.2

Version of the custom_component

2.1.10

Describe the bug

The home assistant logger shows an error and entity "..._verdunstung_in_den_nachsten_24_stunden" is unavailable. It was invented in the last release of this addon.

Debug log

none

Error Message


logger: homeassistant
Source: custom_components/dwd_weather/connector.py:649
integration: Deutscher Wetterdienst ([documentation](https://github.com/FL550/dwd_weather), [issues](https://github.com/FL550/dwd_weather/issues))
First occurred: September 22, 2024 at 6:24:58 PM (2558 occurrences)
Last logged: 1:02:07 PM

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _handle_refresh_interval
    await self._async_refresh(log_failures=True, scheduled=True)
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 453, in _async_refresh
    self.async_update_listeners()
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 168, in async_update_listeners
    update_callback()
  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
FL550 commented 1 week ago

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