You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, great API you made here. I've been enjoying it. I do have one question. I am using this to change the color of my Lightstrip based on other info I'm pulling. It does this like every five minutes. I'm wondering if there is some way I can check the current color of the lightstrip? The issue is that say x happens so the light will remain green. My program turns the light green and sets the brightness to max. However, each time it checks it is setting the light to green (dims light) then changes the brightness to max. This causes the lights to kind of change a little every time I check rather than staying one solid color.
Wondering if there is a way for me to implement this better?
The text was updated successfully, but these errors were encountered:
Hey, thanks for your message! :) Reading the colors back from the lights is a bit tricky, that's why it has not exactly been implemented. See, the API returns the color as x and y coordinates. For example, "xy": [0.6915, 0.3083] corresponds to a certain shade of red, whereas "xy": [0.17, 0.7] is green. I probably could create a mapping from those coordinates back to some understandable value, but for now your best bet is to read Light.getState().getXy() and to compare those values with some known values.
Hi, great API you made here. I've been enjoying it. I do have one question. I am using this to change the color of my Lightstrip based on other info I'm pulling. It does this like every five minutes. I'm wondering if there is some way I can check the current color of the lightstrip? The issue is that say x happens so the light will remain green. My program turns the light green and sets the brightness to max. However, each time it checks it is setting the light to green (dims light) then changes the brightness to max. This causes the lights to kind of change a little every time I check rather than staying one solid color.
Wondering if there is a way for me to implement this better?
The text was updated successfully, but these errors were encountered: