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

[Matter] Failed to perform the action select/select_option. 'MicrowaveOvenMode' object has no attribute 'Commands' #123258

Closed lboue closed 2 months ago

lboue commented 2 months ago

The problem

Hello,

I'm facing a issue selecting a mode in the web interface for the MicrowaveOvenModecluster. image

I get the following error in the web interface: Failed to perform the action select/select_option. 'MicrowaveOvenMode' object has no attribute 'Commands' I have no problem with the other mode selection clusters:

I checked: 1) 'core_matter_server' Matter HA server logs, and no events are triggered when one of the modes is selected in the Home Assistant web interface 2) Matter device logs, no events received

What version of Home Assistant Core has the issue?

2024.8.0b5

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

matter-2a4bd9d95d966aefd2521cccecaf2a8f-TEST_PRODUCT-8b83c9c4beb801ef4515d15e877db1e9.json

Example YAML snippet

No response

Anything in the logs that might be useful for us?

2024-08-06 20:46:10.323 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140460188070192] Unexpected exception
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/select/__init__.py", line 188, in async_handle_select_option
    await self.async_select_option(option)
  File "/usr/src/homeassistant/homeassistant/components/matter/select.py", line 95, in async_select_option
    command=cluster.Commands.ChangeToMode(newMode=mode.mode),
            ^^^^^^^^^^^^^^^^
AttributeError: 'MicrowaveOvenMode' object has no attribute 'Commands'

Additional information

image

Steps to reproduce

Matter Linux/Mac All Clusters Example: https://github.com/project-chip/connectedhomeip/tree/master/examples/all-clusters-app/linux

$ cd connectedhomeip
$ ./scripts/run_in_build_env.sh "./scripts/build/build_examples.py --target linux-x64-all-clusters-no-ble-asan-clang build"
$ .//out/linux-x64-all-clusters-no-ble-asan-clang/chip-all-clusters-app

Pair this device with Home Assistant.

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)

agners commented 2 months ago

Hm, it seems that the Microwave Oven Mode Cluster does not support the ChangeToMode command. It is explicitly marked as X (Disallowed).

I guess we have to convert it to a sensor.