core icon indicating copy to clipboard operation
core copied to clipboard

Inconsistent handling of Matter 'null' attribute values

Open jvmahon opened this issue 4 months ago • 1 comments

The problem

Currently, there's an inconsistency in the handling of 'nullable' Matter attributes and HomeAssistant value representations, this can be seen in the number input fields for values such as OnLevel (nullable using the value 255), and OnTransitionTime, OffTransitionTime, OnOffTransitionTime (not currently nullable, but presumably you'd use 65535 to null).

From some work I'm doing with Inovelli, users seem to be quite confused about the 255 value for OnLevel since Hubitat normally uses 255 as a valid level value.

A short-term fix for this could be that 'null' for any nullable values be represented by a "-1" instead of 255 / 65535 to more clearly call a user's attention to the fact that something is 'different' about this number. A long-term fix would be for the HomeAssistant Numbers entity to have an _allow_nullable = true type option so there can be "blanks" in the input box or an explicit null checkbox type of arrangement and symbol (e.g., a Ø symbol)(how does one get a proposal for that going?).

I'd also suggest that the Matter "On Level" permitted range 1-254 maps to the full Hubitat range of on values, 1-255 (using whatever scaling is currently used for the Matter Level Control CurrentLevel attribute and commands)

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

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

jvmahon avatar Oct 14 '24 10:10 jvmahon