kvj / hass_nuki_ng

Better support for Nuki devices in the Home Assistant
MIT License
185 stars 36 forks source link

sensor & binary_sensor domains are not working in Home Assistant 2022.4 (beta) #50

Closed sli-cka closed 2 years ago

sli-cka commented 2 years ago

In current beta versions of 2022.4 the sensor and binary_sensor domains are not working anymore. I am getting the following error message:

Logger: homeassistant.components.binary_sensor
Source: helpers/entity_registry.py:529
Integration: Binärsensor (documentation, issues)
First occurred: 16:13:17 (2 occurrences)
Last logged: 16:13:17

Error adding entities for domain binary_sensor with platform nuki_ng
Error while setting up nuki_ng platform for binary_sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 382, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in _async_add_entity
    entry = entity_registry.async_get_or_create(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 345, in async_get_or_create
    return self.async_update_entity(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_registry.py", line 529, in async_update_entity
    raise ValueError("entity_category must be a valid EntityCategory instance")
ValueError: entity_category must be a valid EntityCategory instance

On discord beta channel i found the following message regarding a similar error message:

That looks like custom components using the string instead of the enum for EntityCategory

sli-cka commented 2 years ago

This should be the related change in HA core

https://github.com/home-assistant/core/pull/66549#discussion_r840676849

kvj commented 2 years ago

true. please update to 0.3.0 I've just created a tag

sli-cka commented 2 years ago

Can confirm that 0.3.0 fixed the problem. Thanks for this super fast response @kvj :) Will close the issue now