Open PaulSD opened 1 month 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!
(message by CodeOwnersMention)
matter documentation matter source (message by IssueLinks)
The problem
Per the integration developer docs, Integrations should raise
HomeAssistantError
exceptions for device communication failures on action calls.The Matter Integration does not do that. More specifically, it does not catch/translate
MatterError
exceptions raised by python-matter-server, so it effectively raisesMatterError
instead ofHomeAssistantError
for device errors.One impact of this is that an Automation (which calls an action on a Matter device) will terminate if a Matter device error occurs, even if
continue_on_error
is set in the Automation. (Becausecontinue_on_error
only ignoresHomeAssistantError
exceptions.)I think this should be fairly easy to fix, but there are a number of different ways to fix it and it isn't clear to me which would fit best into the current design / coding style, so I don't want to attempt a fix without some guidance, and you might find that fixing it is easier than providing guidance. (eg. Would it make sense to add a wrapper around
matter_client.send_device_command()
toMatterEntity
and translate exceptions there? Should there be a single genericMatterHomeAssistantError
, or should differentMatterError
classes from python-matter-server be translated to differentHomeAssistantError
classes?)What version of Home Assistant Core has the issue?
2024.10.2
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
Anything in the logs that might be useful for us?
Additional information
No response