Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unifi Protect bug with G4 doorbell #124093

Open
BerserkeR-Git opened this issue Aug 17, 2024 · 2 comments
Open

Unifi Protect bug with G4 doorbell #124093

BerserkeR-Git opened this issue Aug 17, 2024 · 2 comments

Comments

@BerserkeR-Git
Copy link

BerserkeR-Git commented Aug 17, 2024

The problem

Home Assistant automations are no longer working because of a bug that makes the unifi protect integration crash.

What version of Home Assistant Core has the issue?

core-2024.8.1

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

UniFi Protect

Link to integration documentation on our website

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

Diagnostics information

config_entry-unifiprotect-01J5EYQRBJDJH1MY3SA47HV1CT.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

Logger: homeassistant.components.number
Source: helpers/entity_platform.py:598
integration: Number (documentation, issues)
First occurred: 03:37:08 (1 occurrences)
Last logged: 03:37:08

Error adding entity number.g4_doorbell_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

Additional information

No response

@home-assistant
Copy link

@darkrain-nl
Copy link

darkrain-nl commented Aug 17, 2024

This was already reported and the cause seems to be the custom value, perhaps my comment #122408 (comment) helps work around it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants