FL550 / dwd_weather

Deutscher Wetterdienst integration for Home-Assistant
MIT License
157 stars 11 forks source link

TypeError: '<' not supported between instances of 'NoneType' and 'float' #113

Closed holger-dunst closed 6 months ago

holger-dunst commented 7 months ago

Version of home_assistant

Core 2023.12.2 Supervisor 2023.11.6 Operating System 11.2 Frontend 20231208.2

Version of the custom_component

v2.0.13

Describe the bug

I have found the following exception multiple time in my logs: 2023-12-13 22:56:31.711 ERROR (MainThread) [homeassistant.helpers.script.trigger_update_coordinator] Trigger Update Coordinator: Error executing script. Unexpected error for call_service at pos 1: '<' not supported between instances of 'NoneType' and 'float' Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 704, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 666, in _async_run_long_action return long_task.result() ^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service return await service.entity_service_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 1139, in async_get_forecasts_service native_forecast_list = await weather.async_forecast_hourly() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dwd_weather/weather.py", line 59, in async_forecast_hourly return self._connector.get_forecast(WeatherEntityFeature.FORECAST_HOURLY) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dwd_weather/connector.py", line 183, in get_forecast wind_dir = self.get_wind_direction_symbol(wind_dir) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/dwd_weather/connector.py", line 462, in get_wind_direction_symbol if value < 22.5: ^^^^^^^^^^^^ TypeError: '<' not supported between instances of 'NoneType' and 'float'

FL550 commented 6 months ago

I'll have a look into this. Thanks for reporting!