Issues with UniFi Protect integration

UniFi OS : v3.2.7
Protect : 2.10.11
HA : 2023.12.3

Good evening everyone,

I hope I have found the right group ?

I’ve been running HA for some time now and haven’t had any major problems yet. But since today I have problems with the UniFi Protect integration !

Unfortunately, I can no longer log on to my Dream Machine Pro with the integration. In my existing installation “Error during setup” appears. If I try a new installation the same thing happens.

Does anyone have the same problem or better still a workaround ?

My integration is also failing. UDMPro failed to configure the protect integration. All of my camera automations are dead. It all started right after updating the firmware on my three switches which are all now at 6.6.53.

I can access the cameras through the UDMPro without fail, but HA no longer sees the integration.

I too have the same versions that juergen_ehret does.

Logger: homeassistant.config_entries
Source: config_entries.py:402
First occurred: 6:27:57 PM (2 occurrences)
Last logged: 6:59:30 PM

Error setting up entry UDMPRO for unifiprotect
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 402, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/__init__.py", line 105, in async_setup_entry
    await _async_setup_entry(hass, entry, data_service)
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/__init__.py", line 137, in _async_setup_entry
    await data_service.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 114, in async_setup
    await self.async_refresh()
  File "/usr/src/homeassistant/homeassistant/components/unifiprotect/data.py", line 134, in async_refresh
    updates = await self.api.update(force=force)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/api.py", line 666, in update
    events = await self.get_events(
             ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/api.py", line 794, in get_events
    event = create_from_unifi_dict(event_dict, api=self)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/convert.py", line 66, in create_from_unifi_dict
    return klass.from_unifi_dict(**data, api=api)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 120, in from_unifi_dict
    data = cls.unifi_dict_to_dict(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/nvr.py", line 243, in unifi_dict_to_dict
    return super().unifi_dict_to_dict(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 355, in unifi_dict_to_dict
    data[key] = cls._clean_protect_obj(data[key], unifi_objs[key], api)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 289, in _clean_protect_obj
    return klass.unifi_dict_to_dict(data=data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/nvr.py", line 179, in unifi_dict_to_dict
    return super().unifi_dict_to_dict(data)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/data/base.py", line 348, in unifi_dict_to_dict
    data[key] = convert_unifi_data(data[key], cls.__fields__[key])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/pyunifiprotect/utils.py", line 238, in convert_unifi_data
    return type_(value)
           ^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 712, in __call__
    return cls.__new__(cls, value)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/enum.py", line 1135, in __new__
    raise ve_exc
ValueError: 'updating' is not a valid SensorStatusType
1 Like

Hi! I see the same and appreciate any perspectives.

Update: This is a known issue and appears to be fixed in 2023.12.4 per this thread.