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
72.96k stars 30.52k forks source link

Matter integration fails on setup #123604

Closed evgenyshulman closed 1 month ago

evgenyshulman commented 2 months ago

The problem

After the 2024.8 updated, The following error has appeared in HA logs . No devices are shown (only 1 lamp is shown in integration page, after removing/adding the integration)

2024-08-11 20:12:18.046 ERROR (MainThread) [homeassistant.components.matter] Unexpected exception: 255 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/matter/init.py", line 166, in _client_listen await matter_client.start_listening(init_ready) File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 639, in start_listening self._handle_incoming_message(msg) File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 677, in _handle_incoming_message self._handle_event_message(msg) File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 702, in _handle_event_message self._signal_event(event, data=node, node_id=node.node_id) File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 781, in _signal_event callback(event, data) File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in node_updated_callback self._setup_node(node) File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 148, in _setup_node self._setup_endpoint(endpoint) File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 225, in _setup_endpoint new_entity = entity_info.entity_class( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 110, in init self._update_from_device() File "/usr/src/homeassistant/homeassistant/components/matter/select.py", line 76, in _update_from_device self._attr_current_option = value_convert(value) ^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/matter/select.py", line 232, in measurement_to_ha=lambda x: { ^

KeyError: 255

The Matter integration is synced with 1Home Server (200 devices) latest version (2.2.3)

What version of Home Assistant Core has the issue?

core-2024.8.1

What was the last working version of Home Assistant Core?

core-2024.7

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter + 1Home Server

Link to integration documentation on our website

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

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-08-11 20:12:18.046 ERROR (MainThread) [homeassistant.components.matter] Unexpected exception: 255
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 166, in _client_listen
    await matter_client.start_listening(init_ready)
  File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 639, in start_listening
    self._handle_incoming_message(msg)
  File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 677, in _handle_incoming_message
    self._handle_event_message(msg)
  File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 702, in _handle_event_message
    self._signal_event(event, data=node, node_id=node.node_id)
  File "/usr/local/lib/python3.12/site-packages/matter_server/client/client.py", line 781, in _signal_event
    callback(event, data)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 77, in node_updated_callback
    self._setup_node(node)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 148, in _setup_node
    self._setup_endpoint(endpoint)
  File "/usr/src/homeassistant/homeassistant/components/matter/adapter.py", line 225, in _setup_endpoint
    new_entity = entity_info.entity_class(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 110, in __init__
    self._update_from_device()
  File "/usr/src/homeassistant/homeassistant/components/matter/select.py", line 76, in _update_from_device
    self._attr_current_option = value_convert(value)
                                ^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/matter/select.py", line 232, in <lambda>
    measurement_to_ha=lambda x: {
                                ^

KeyError: 255

Additional information

No response

home-assistant[bot] commented 2 months ago

Hey there @home-assistant/matter, mind taking a look at this issue as it has been labeled with an integration (matter) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `matter` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign matter` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


matter documentation matter source (message by IssueLinks)