newt10 / homebridge-broadlink-rm-enhanced

Broadlink RM Mini and Pro plugin for homebridge:
https://github.com/nfarina/homebridge
Apache License 2.0
9 stars 1 forks source link

Added white color to light accessory #18

Closed pickanothername closed 3 years ago

newt10 commented 3 years ago

@JuniorGenius thanks for the PR. Can you add some more insight into what was the existing problem and why this enhancement is needed?

pickanothername commented 3 years ago

@newt10 Hi, sure!

The (frankly rather major) issue with the current setup is that for light accessories' color, there is an implementation of hue without saturation. Therefore, there is no way to set your lights to white (let alone less-saturated or lighter colors).

This PR does not fully implement saturation, but it does implement the ability to set your lights to white by taking any color set by HomeKit with a saturation of < 10 (within white range) and setting your light to the white parameter, which is defined in the config.

This parameter would be configured just like any other color. So for example, instead of "hue120": "1234…" you would use "white": "1234…" I added this to the sample config as well.

Hope that provides some clarity!

newt10 commented 3 years ago

Enhancement to support white mode for bulbs