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

feat: add support for rgbcw bulbs #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ali-hk
Copy link

@ali-hk ali-hk commented Oct 21, 2023

bulbs with hardware version 0x0e are RGBCW bulbs which are currently unsupported. add support for these types of bulbs and enable setting the color temperature directly, transforming between mired (micro-reciprocal degrees) as used by HomeKit and white values, rather than transforming HSL values.

bulbs with hardware version 0x0e are RGBCW bulbs which are
currently unsupported. add support for these types of bulbs and
enable setting the color temperature directly, transforming between
mired (micro-reciprocal degrees) as used by HomeKit and white
values, rather than transforming HSL values.
!this.myDevice.lightParameters.hasCCT &&
this.lightState.HSL.luminance > 0 &&
this.lightState.isOn
) {
this.updateLocalBrightness(this.lightState.HSL.luminance * 2);
Copy link
Author

@ali-hk ali-hk Oct 21, 2023

Choose a reason for hiding this comment

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

It's unclear to me why the local brightness value gets updated here, but this seems to cause HomeKit to show the wrong color value when navigating away and back to the accessory settings, if the color value was set to a color temperature rather than RGB, so I've added a condition to skip it for CCT cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant