Closed SteffenKn closed 3 years ago
Link doesn't work. Private repo?
On Sat, 16 Jan 2021 at 7:02 AM Steffen Knaup notifications@github.com wrote:
I'm currently switching from sinric to sinricpro and apparently setColorTemperature doesn't work in sinricpro.
Here is my code if that helps:
https://github.com/SteffenKn/WS2801-alexa/blob/feature/use_sinric-pro/src/alexa-device-handler.ts
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sinricpro/nodejs-sdk/issues/8, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZQU25Q4QVHYTVTLTO3S2DJRJANCNFSM4WEY4OYA .
I changed the link after creating the issue, maybe you clicked the old one.
Correct me if I'm wrong, but shouldn't there be an if statement for setColorTemperature in this code: https://github.com/sinricpro/nodejs-sdk/blob/ea87b3763a738cde5cf56bee7e814f3019692247/lib/cbhandler.js#L61-L189
Yes it looks like setColorTemperature is missing here
On Sat, 16 Jan 2021 at 10:07 AM Steffen Knaup notifications@github.com wrote:
Correct me if I'm wrong, but shouldn't there be an if statement for setColorTemperature in this code:
— You are receiving this because you commented.
Reply to this email directly, view it on GitHub https://github.com/sinricpro/nodejs-sdk/issues/8#issuecomment-761301750, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABZAZZVVMFFY3SQZ3P5EYE3S2D7HXANCNFSM4WEY4OYA .
@SteffenKn I have updated the SDK to support setColorTemperature. Dhanush will push this to npm repo soon.
Example https://github.com/sinricpro/nodejs-sdk/blob/master/examples/light-bulb/light-bulb.js
Sounds good. Thanks for the quick fix.
I just tested the changes and the callback is now triggered, but Alexa always claims that the device is not responding.
This is due to an bug in the ColorTemperature Controller: https://github.com/sinricpro/nodejs-sdk/blob/232d5e71a8b25909c78107d5ef8989d6625db82d/lib/contorllers/color_temperature.js#L16
This line should end with resolve(payload.value);
instead of resolve(payload.colorTemperature);
Thanks
Fixed. Wil update the npm soon https://github.com/sinricpro/nodejs-sdk/commit/89b7fc237d81ff71ae2a1e98f5ad7d899eeeb40a
Just a friendly reminder in case you forgot: The package is not yet published.
I'm currently switching from sinric to sinricpro and apparently setColorTemperature doesn't work in sinricpro.
Here is my code if that helps: https://github.com/SteffenKn/WS2801-alexa/blob/develop/src/alexa-device-handler.ts