Skip to content

Exception while running subscription handler #124717

Closed
@bartbakels

Description

The problem

I have since at least the 2024.8 release the follwing 3 ERROR messages in my error log;

`Logger: uiprotect.api
Bron: /usr/local/lib/python3.12/site-packages/uiprotect/api.py:862
Eerst voorgekomen: 16:31:58 (10 gebeurtenissen)
Laatst gelogd: 16:51:45

Exception while running subscription handler
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/uiprotect/api.py", line 860, in emit_message
sub(msg)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 295, in _async_process_ws_message
self._async_update_device(new_obj, message.changed_data)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 232, in _async_update_device
self._async_signal_device_update(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 339, in _async_signal_device_update
update_callback(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/entity.py", line 226, in _async_updated_event
self._async_update_device_from_protect(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/number.py", line 272, in _async_update_device_from_protect
self._attr_native_value = self.entity_description.get_ufp_value(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uiprotect/data/devices.py", line 1155, in icr_lux_display
return LUX_MAPPING_VALUES[10 - self.isp_settings.icr_custom_value]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range`

next to this one;

`Logger: homeassistant
Bron: components/unifiprotect/number.py:272
Eerst voorgekomen: 15:35:14 (6 gebeurtenissen)
Laatst gelogd: 16:50:14

Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 195, in async_refresh
self._async_update_change(True, force_update=True)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 170, in _async_update_change
self._async_process_updates()
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 302, in _async_process_updates
self._async_signal_device_update(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 339, in _async_signal_device_update
update_callback(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/entity.py", line 226, in _async_updated_event
self._async_update_device_from_protect(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/number.py", line 272, in _async_update_device_from_protect
self._attr_native_value = self.entity_description.get_ufp_value(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uiprotect/data/devices.py", line 1155, in icr_lux_display
return LUX_MAPPING_VALUES[10 - self.isp_settings.icr_custom_value]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range`

AND THIS, WHICH LOOK LIKE RELATED;

Logger: homeassistant.components.number
Bron: helpers/entity_platform.py:598
integratie: Nummer (documentatie, problemen)
Eerst voorgekomen: 15:20:17 (1 gebeurtenissen)
Laatst gelogd: 15:20:17

Error adding entity number.woonkamer_infrared_custom_lux_trigger for domain number with platform unifiprotect
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 598, in _async_add_entities
await coro
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 912, in _async_add_entity
await entity.add_to_platform_finish()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1365, in add_to_platform_finish
await self.async_added_to_hass()
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/entity.py", line 254, in async_added_to_hass
self._async_update_device_from_protect(self.device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/number.py", line 272, in _async_update_device_from_protect
self._attr_native_value = self.entity_description.get_ufp_value(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uiprotect/data/devices.py", line 1155, in icr_lux_display
return LUX_MAPPING_VALUES[10 - self.isp_settings.icr_custom_value]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

Also tried removing and reinstalling/setting up the the integration, but this does not resolve.

What version of Home Assistant Core has the issue?

2024.8

What was the last working version of Home Assistant Core?

2024.6

What type of installation are you running?

Home Assistant OS

Integration causing the issue

unifi protect

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions