Tradfri - unique_id's and color_temp support for rgb-bulbs#13531
Merged
pvizeli merged 4 commits intohome-assistant:devfrom Mar 29, 2018
Merged
Tradfri - unique_id's and color_temp support for rgb-bulbs#13531pvizeli merged 4 commits intohome-assistant:devfrom
pvizeli merged 4 commits intohome-assistant:devfrom
Conversation
Cannot set_color_temp on color bulb, needs conversion from mired to hsb
| not self._light_control.can_set_color): | ||
| await self._api( | ||
| self._light_control.set_color_temp(temp, **params)) | ||
| # Color White Spsctrum (CWS) bulb |
pvizeli
approved these changes
Mar 29, 2018
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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:
unique_ids for lights and light groups:
These are based on the gateway_id and the group/light id. The group/light id's can change when users re-pair their devices, or when users reset their gateway to factory defaults.
This is the best we can currently get on this platform.
Unfortunately tradfri doesn't expose the serial numbers on their API (while they do for thier Homekit integration)
There's already been some discussion about the unique_id style here: #13439
setting color temperature on a color/rgb bulb:
Unfortunately the CWS (color white spectrum) bulbs don't react to setting their color_temperature value. So we need to convert the color_temperature to hs(b) and set that with set_hsb.
This solves a feature regression compared to the previous platform/library version.
Checklist:
tox. Your PR cannot be merged unless tests pass