Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix HomeKit behavior with lights supporting color and temperature #30756

Merged
merged 1 commit into from
Jan 14, 2020

Conversation

frenck
Copy link
Member

@frenck frenck commented Jan 14, 2020

Description:

If a light supports both the Hue and ColorTemperature 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:

2020-01-14 13 38 08

(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 supports Hue 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:

2020-01-14 15 17 59

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:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

@project-bot project-bot bot added this to Needs review in Dev Jan 14, 2020
Dev automation moved this from Needs review to Reviewer approved Jan 14, 2020
@pvizeli
Copy link
Member

pvizeli commented Jan 14, 2020

Nice!

@pvizeli pvizeli added this to the 0.104.0 milestone Jan 14, 2020
@balloob balloob merged commit 6b49bea into dev Jan 14, 2020
Dev automation moved this from Reviewer approved to Done Jan 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the frenck-2020-0080 branch January 14, 2020 15:09
@Kane610
Copy link
Member

Kane610 commented Jan 14, 2020

Awesome @frenck

@lock lock bot locked and limited conversation to collaborators Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Dev
  
Done
5 participants