-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Add more philips effect lights #5312
Add more philips effect lights #5312
Conversation
That's fine!
Yes please do so in a new Thanks for your contributions again! |
lib/philips.js
Outdated
@@ -249,4 +659,9 @@ function encodeGradientColors(value, opts) { | |||
module.exports = { | |||
decodeGradientColors, | |||
encodeGradientColors, | |||
hueExtend, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is in philips.js
, we can rename this to just extend
. (we do the same for TuYa)
devices/philips.js
Outdated
const e = exposes.presets; | ||
const ea = exposes.access; | ||
|
||
// Make sure extend.light_* is not used (hueExtend should be used instead) | ||
// Make sure extend.light_* is not used (philips.hueExtend should be used instead) | ||
const extendDontUse = require('../lib/extend'); | ||
const extend = {switch: extendDontUse.switch}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const extendDontUse = require('../lib/extend');
can be removed, when changing const extend = {switch: extendDontUse.switch};
to const extend = {switch: require('../lib/extend').switch};
lib/philips.js
Outdated
@@ -249,4 +659,9 @@ function encodeGradientColors(value, opts) { | |||
module.exports = { | |||
decodeGradientColors, | |||
encodeGradientColors, | |||
hueExtend, | |||
tzLocal, | |||
fzLocal, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Local
can be dropped (just like TuYa):
zigbee-herdsman-converters/lib/tuya.js
Line 1814 in 75db090
tz: tuyaTz, |
… into more-philips-effect-lights
Thanks for the review. All done! |
Looks great, thanks! |
This PR adds candle effect support for additional lights.
I have confirmed this works on:
I don't have LWW002 to test with. Since it's the same definition and title as LWA003 I assume it works and it's just a later revision?
As well, for testing this with an external converter required a ton of copy-paste. Would we consider exporting
hueExtend
?Finally, I'm not sure if Philips makes lights that are a "bright white" color temperature only. If so, I assume they don't support Candle in which case I think we'd want to change what's
light_onoff_brightness
to something likelight_onoff_warm_brightness
.