Adjust unknown color mode handling in ZHA lights#162292
Conversation
|
Hey there @dmulcahey, @Adminiuga, @puddly, @TheJulianJES, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
TheJulianJES
left a comment
There was a problem hiding this comment.
We'll also switch ZHA to never return None. Not sure if it even does, but it's still typed like that.
There was a problem hiding this comment.
Pull request overview
This PR adjusts the ZHA light component to properly handle unknown color modes following the changes in PR #162276, which removes the legacy fallback for reporting color_mode as None. The ZHA light integration now explicitly returns ColorMode.UNKNOWN instead of None when the underlying entity's color mode is not set.
Changes:
- Changed the return type of the
color_modeproperty fromColorMode | NonetoColorMode - Modified the fallback behavior to return
ColorMode.UNKNOWNinstead ofNonewhen the entity's color mode is not available
Proposed change
Spotted in #162276
Type of change
Additional information
Checklist
ruff format homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all.To help with the load of incoming pull requests: