MrGauz / home-assistant-munich-transport

Munich public transport (MVG) widget for Home Assistant
MIT License
12 stars 5 forks source link

HA Log: Error doing job: Task exception was never retrieved #7

Open RaphaelMUC opened 3 months ago

RaphaelMUC commented 3 months ago

Hi, I just tried to implement this great integration into my HA and followed your guide.

But unfortunately HA spits out the following two errors in the log. I also tried to test the example sensor configuration of the HA site but with the same result.

Error 1: `Logger: homeassistant Quelle: components/sensor/init.py:665 Erstmals aufgetreten: 12:02:14 (15 Vorkommnisse) Zuletzt protokolliert: 12:09:14

Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state numerical_value = int(value) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '-'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state numerical_value = float(value) ^^^^^^^^^^^^ ValueError: could not convert string to float: '-'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1029, in _update_entity_states await entity.async_update_ha_state(True) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 968, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state raise ValueError( ValueError: Sensor sensor.hbf has device class 'None', state class 'None' unit 'min' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '-' (<class 'str'>) `

Error 2: Logger: homeassistant.components.sensor Quelle: helpers/entity_platform.py:892 Integration: Sensor (Dokumentation, Probleme) Erstmals aufgetreten: 12:01:44 (3 Vorkommnisse) Zuletzt protokolliert: 12:01:44

Error adding entity sensor.hbf for domain sensor with platform mvglive Error adding entity sensor.sendlinger_tor for domain sensor with platform mvglive Error adding entity sensor.scheidplatz for domain sensor with platform mvglive Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 658, in state numerical_value = int(value) ^^^^^^^^^^ ValueError: invalid literal for int() with base 10: '-'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 661, in state numerical_value = float(value) ^^^^^^^^^^^^ ValueError: could not convert string to float: '-'

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 892, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1359, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1009, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1132, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1067, in async_calculate_state state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1015, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 665, in state raise ValueError( ValueError: Sensor sensor.hbf has device class 'None', state class 'None' unit 'min' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '-' (<class 'str'>)