Skip to content

Tradfri - unique_id's and color_temp support for rgb-bulbs#13531

Merged
pvizeli merged 4 commits intohome-assistant:devfrom
NovapaX:feature/tradfri_uid_cws_colortemp
Mar 29, 2018
Merged

Tradfri - unique_id's and color_temp support for rgb-bulbs#13531
pvizeli merged 4 commits intohome-assistant:devfrom
NovapaX:feature/tradfri_uid_cws_colortemp

Conversation

@NovapaX
Copy link
Copy Markdown
Contributor

@NovapaX NovapaX commented Mar 29, 2018

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:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

NovapaX added 3 commits March 29, 2018 15:54
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo

@pvizeli pvizeli merged commit 298e6ee into home-assistant:dev Mar 29, 2018
@NovapaX NovapaX deleted the feature/tradfri_uid_cws_colortemp branch March 29, 2018 19:42
@balloob balloob mentioned this pull request Apr 13, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants