Closed KiterWork closed 6 months ago
looks like this could be the culprit?
Update i got it to work with the following code
await client.deviceSets.setAttributes({
id: deviceSets[0].id,
attributes: {
lightLevel: 1
},
transitionTime: 10000
})
Seems like theres something different in client.devices.setAttributes versus client.deviceSets.setAttributes
Final update before closing: the docs are messed up, the syntax should be updated. lll make a pr.
Sorry for the inconvenience, and thanks for your investigation! I hope I'll have time to check your findings and the PR by tomorrow! 🙂
Hey! I forgot to update here, but i was a total idiot and the code is totally fine in the docs. The issue was that the setAttributes section didnt include example code so i didnt know i had to split the transitiontime outside of the attributes object.
The issue was that the setAttributes section didnt include example code so i didnt know i had to split the transitiontime outside of the attributes object.
Noted! I'll try to make this clearer in the future.
I'm curious, are you using TypeScript in your own code? That, while doesn't replace a good documentation, but should help with these types of problems a little bit:
Heyo! Ive been messing around with the library and found out that client.devices.setAttributes never takes the transitionTime attribute into consideration. My code is as follows
But the time taken is approximately 1 second regardless of the time provided in transitionTime. I cant seem to figure out any further way to log internal errors, so i hope you are able to point me in the right direction