home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
71.81k stars 30.07k forks source link

Constant Errors In Logs After Updating To Latest Version of Core #122408

Open vash2695 opened 2 months ago

vash2695 commented 2 months ago

The problem

Getting this error every 10 seconds:

2024-07-22 12:08:34.076 ERROR (MainThread) [uiprotect.api] 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 296, in _async_process_ws_message
self._async_update_device(new_obj, message.changed_data)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 233, in _async_update_device
self._async_signal_device_update(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 340, in _async_signal_device_update
update_callback(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/entity.py", line 238, in _async_updated_event
self._async_update_device_from_protect(device)
File "/usr/src/homeassistant/homeassistant/components/unifiprotect/number.py", line 273, 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/utils.py", line 651, in get_top_level_attr
value = getattr(obj, attr)
^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/uiprotect/data/devices.py", line 1130, in icr_lux_display
return LUX_MAPPING_VALUES[10 - self.isp_settings.icr_custom_value]
~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
IndexError: list index out of range

What version of Home Assistant Core has the issue?

core-2024.7.3

What was the last working version of Home Assistant Core?

core-2024.7.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

unifiprotect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifiprotect

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

home-assistant[bot] commented 2 months ago

unifiprotect documentation unifiprotect source

darkrain-nl commented 2 months ago

This happens to me as well when the settings for nightvision are like so: afbeelding

I think it has to do with the "under 1" setting.

vash2695 commented 1 month ago

I hadn't set any custom settings for night vision, but I did have some custom color settings. Setting those back to default seems to have fixed the issue, but that may mean that anyone using non-default settings on any of their cameras may be having this issue as well.

BerserkeR-Git commented 1 month ago

I have the same issue, looks like you have to reset all custom picture settings but the custom night vision trigger seem to work on 1 lux though, it only crashes the package again if you'd use the new '< 1 lux' setting. So in short, all the custom values should be looked at otherwise the package might crash; IndexError: list index out of range