1) Give a description of the problem
So what I’m trying to do is when one of my Philip’s Hue Light Bulb or bulbs turn on they pull specific data out of a global variable that stores all of the attributes for specific hue scenes. The global variable is set up in the form of device, color temperature, hue, saturation, and level. So far i have been successful with setting the lights attributes when all of the lights turn on. But when I try to pull the data to set one bulb the index of the string is off and i cannot for the life of me figure out how to make this work. If someone could please hello me figure this out I’d really appreciate it, I’m completely stumped and have spent weeks trying to figure it out.
Here is a example global variable that I’m using
Bed Lightstrip,6500,248,100,76,Ceiling,6500,216,98,76,Center,6500,158,100,75,Chandelier 1,2571,61,100,76,Chandelier 2,6500,273,87,76,Chandelier 3,6500,356,100,76,Chandelier 4,6500,133,100,76,Chandelier 5,6500,252,100,76,Desk Go,6500,7,100,70,Desk Lightstrip 1,6500,266,85,75,Desk Lightstrip 2,6500,165,69,70,Dresser Go,6500,360,96,76,Left,6500,237,100,75,Left Nightstand,6500,140,85,76,Right,6500,277,100,75,Right Nightstand,6500,262,85,76,TV Lightstrip,6500,345,100,75,
2) What is the expected behaviour?
What I’m trying to accomplish is depending on the time of day and the current location mode have preset light scenes that are saved as global variables. When turning all of the lights on there is no issue setting the bulbs to the correct color temperature, hue, saturation, and level. But when trying to set one bulb to the correct attributes I’m having a ton of trouble pulling out the desired data string.
3) What is happening/not happening?
What’s happening is that the index of the values isn’t consistent. For example when i make an equation that correctly finds the index of the TV Lightstrip and its attributes, then ill use the same equation to find the index of the Dresser Go it gives me the wrong values.
**4) Post a Green Snapshot of the
I don’t have a code that works for this but ill post my code that works when I’m turning all of the lights on. And here’s the code 0f4e and i apologize i wrote this on my phone.
5) Attach logs after turning logging level to Full
This code currently works.
REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.