Home-Assistant-custom-components-iMPK icon indicating copy to clipboard operation
Home-Assistant-custom-components-iMPK copied to clipboard

Task exception was never retrieved (None)

Open Krzysztonek opened this issue 1 year ago • 2 comments

The following issue occurs:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1037, in _async_update_entity_states
    await entity.async_update_ha_state(True)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 960, in async_update_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/impk/sensor.py", line 84, in extra_state_attributes
    attr['html_timetable'] = self.get_html_timetable()
                             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/impk/sensor.py", line 143, in get_html_timetable
    if len(direction) == 0:
       ^^^^^^^^^^^^^^
TypeError: object of type 'NoneType' has no len()

Krzysztonek avatar Oct 08 '24 21:10 Krzysztonek

When did it work for the last time?

PiotrMachowski avatar Oct 08 '24 22:10 PiotrMachowski

When did it work for the last time?

I'm not able to reproduce this error, since the integration itself still works fine for me. All its features are reachable and they work without any visible issue. However, the above error is being displayed in the log file quite often with no visible reason.. Might be a minor bug?

Krzysztonek avatar Oct 08 '24 22:10 Krzysztonek