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
73.32k stars 30.63k forks source link

Error adding Aqara Hub M1S (gen 1, matter firmware) via Matter #98683

Closed aizmob closed 1 year ago

aizmob commented 1 year ago

The problem

Trying to commission Aqara M1S (gen 1) device to HA with no success getting an error messages in the log. Another device using this integration (Aqara Hub M2) is working fine.

What version of Home Assistant Core has the issue?

core-2023.8.3

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Matter

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?

Logger: homeassistant.components.matter
Source: components/matter/light.py:196
Integration: Matter (BETA) (documentation, issues)
First occurred: 17:32:52 (3 occurrences)
Last logged: 20:01:32

Unexpected exception:
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/matter/__init__.py", line 128, in _client_listen
    await matter_client.start_listening(init_ready)
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 385, in start_listening
    self._handle_incoming_message(msg)
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 423, in _handle_incoming_message
    self._handle_event_message(msg)
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 479, in _handle_event_message
    self._signal_event(
  File "/usr/local/lib/python3.11/site-packages/matter_server/client/client.py", line 527, in _signal_event
    callback(event, data)
  File "/usr/src/homeassistant/homeassistant/components/matter/entity.py", line 118, in _on_matter_event
    self._update_from_device()
  File "/usr/src/homeassistant/homeassistant/components/matter/light.py", line 353, in _update_from_device
    self._attr_color_temp = self._get_color_temperature()
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/matter/light.py", line 196, in _get_color_temperature
    assert color_temp is not None
           ^^^^^^^^^^^^^^^^^^^^^^
AssertionError

Additional information

No response

home-assistant[bot] commented 1 year 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.

(message by CodeOwnersMention)


matter documentation matter source (message by IssueLinks)

marcelveldt commented 1 year ago

There seems to be a light on that Hub that is missing properties that are required. Could be a bug in the Matter bridghe implementation of the Aqara Hub, or just a device specific fluke. The light reports itself as a light that supports color temperature control while in reality it doesn't. At least that is where the error points at.

Remove the light (do you have any idea which one it can be?) from the Hub and try to pair it again.

aizmob commented 1 year ago

Aqara Hub M1S has RGB light built-in :(

marcelveldt commented 1 year ago

shoot haha, in that case we're out of luck for a workaround. We'll have to wait for Aqara to fix the underlying issue then. Is it mandatory to bind that RGB led to the HUB? If I remember correctly, for the m2 Hub you can choose what devices to bridge

aizmob commented 1 year ago

Is it mandatory to bind that RGB led to the HUB?

That led is bound automatically and I have no additional control on it. So let's wait. Of course beta is beta only... (btw my M2 hub works fine!)

aizmob commented 1 year ago

thanks anyway!