Closed charly166 closed 8 months ago
Without any information about the station or debug log files, I am unable to help
I do not get it for the following IDs: '10739' - Stuttgart Schnarrenberg 'Q358' - Stuttgart Neckartal 'Q823' - Lenzkirch Ruhbuehl
data is always NULL
This is the only error I find in ther logs - I will activate debug level: 30:27.536 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for sensor.lenzkirch_ruhbuhl_sonnenscheindauer (<class 'custom_components.dwd_weather.sensor.DWDWeatherForecastSensor'>) took 0.660 seconds. Please create a bug report at https://github.com/FL550/dwd_weather/issues
Logger: homeassistant
Source: custom_components/dwd_weather/connector.py:258
Integration: Deutscher Wetterdienst ([documentation](https://github.com/FL550/dwd_weather), [issues](https://github.com/FL550/dwd_weather/issues))
First occurred: 24. Oktober 2023 um 15:23:57 (2464 occurrences)
Last logged: 08:27:04
Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 233, in _handle_refresh_interval
await self._async_refresh(log_failures=True, scheduled=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 389, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 172, in async_update_listeners
update_callback()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 879, in _async_write_ha_state
state, attr = self._async_generate_attributes()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 820, in _async_generate_attributes
state = self._stringify_state(available)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 785, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/dwd_weather/sensor.py", line 328, in state
result = self._connector.get_sun_irradiance()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 330, in get_sun_irradiance
return self.get_weather_value(WeatherDataType.SUN_IRRADIANCE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/dwd_weather/connector.py", line 258, in get_weather_value
(next_value - value)
~~~~~~~~~~~^~~~~~~
TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'
Found the issue, there was a typo introduced in one of the last updates. I'll release a new version soon which will fix this.
With one of the updates in the last weeks, the report entity wasn't available anymore. In the meanwhile the entity is there, but always empty. Is there a chance to get this entity back to work? Thanks in advance.
Best regards, Charly