Matter Attribute Input Labeling Error (UI Issue) #133233
Description
The problem
This is both an issue report and what I think is the solution.
Conditions to Create the Issue
This issue arises:
- For Matter devices having multiple endpoints where
- and there are attributes, such as On Level, or On / Off Transition that are common to multiple endpoints,
- and the Fixed Label cluster is also present on the endpoints and the value of LabelList[o] is either "Label" or "Button" (which is necessary for Home Assistant to recognize the label.
The error can be seen with the Inovelli VTM36 fan control canopy module.
The error can NOT be seen with the Inovelli VTM35 Fan Control wall switch (because the wall switch does not meet point # 3, above.
Expected Behavior Example
For comparison, Starting with the VTM36 Fan Wall Switch, this wall switch. Endpoints 1 and 6 share several common attributes which can be set by the user. To distinguish which attribute matches which endpoint is listed in parenthesis, as shown below. This is the expected / desired behavior:
Problem Behavior
Now looking at the VTM35, for this Fan Module, the endpoint attributes no longer show the attribute names like "On Level". Instead, in the VTM35, the code is substituting the Fixed Label name for the endpoint and labeling all the attribute inputs with that name. More specifically, for Endpoint 1 its naming all the attributes "Dimmable Light" and for Endpoint 6 it is labeling all the attributes as Endpoint 6.
Source of the Problem
I believe this code section in the entity.py file is where a correction needs to be made:
Specifically, I suggest that if the entity is of a "Number" type (and, thus, used to input Matter attribute values), then if there is a recognized label, that label should be used in the "postfix" matter of line 107.
Proposed Fix
I think the fix is to add a check in line 106 so that "postfix" method of displaying the label is used when the entity type is a Number input. Unfortunately, I am unable to test this, but hopefully this is close enough of a suggestion that someone can fix.
What version of Home Assistant Core has the issue?
2024.12.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?
No response
Additional information
No response