Fix HomeKit behavior with lights supporting color and temperature #30756
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
If a light supports both the
Hue
andColorTemperature
characteristic types, HomeKit will actually keep both states separate and active and the same time.This causes a problem in several ways since we no longer know what the truth is at this point. This is the best visible from the Home app itself:
(sorry for the low-quality GIF, for more examples, see first linked issue below)
The only option we have is to decide what to use. This PR implements a change that prevents exposing the
ColorTemperature
characteristic when the light supportsHue
as well (like Hue).It resolves the issues linked below, and most likely issues with people using a lot of Philips Hue bulb trying to apply scenes to a bunch of those (which may cause some bulbs not to change as set in the scene).
In the Home apps, even with only
Hue
set, the color temperature selection remains available. However, colors are sent to Home Assistant, instead of a temperature.After movie:
Related issue (if applicable): fixes #19251 fixes #23394 fixes #27170
Pull request with documentation for home-assistant.io (if applicable): n/a
Example entry for
configuration.yaml
(if applicable):homekit:
Checklist:
tox
. Your PR cannot be merged unless tests passIf the code does not interact with devices: