1) Give a description of the problem
I would like to design a piston that increases the color temp by 500 with each button press if the actual color temp is below 6500 and decreases the color temp by 500 once it hits 6500 down to 2700 then goes back up to 6500. or goes up until it hits 6500 and then goes to 2700 and continues up again.
Cycle through an interval of values (color temp) with a button press
Please do not take this hard, but I would delete that entire piston, and start fresh…
(it would take a few pages to point out everything)
A button event only needs a single trigger
, that has nothing to do with the bulb itself.
Although, your post mentions using a button, it appears your code is using a switch(?).
Which is it? (The coding is VERY different)
It might also make the coding easier if the math balanced out…
Instead of using 500, if you added/subtracted 475 instead, it would take exactly 8 presses to go from 2700-6500. (If 8 presses is too much, you can do it in 5 steps by using +/- 760)
so where do I start?
I’m using sylvania rb30 RGB bulbs with a sengled smart light switch using the top button.
I also have a few ikea 5 button remotes lying around.
So just to clarify…
If you meant BR30, then that can either be a smart or a dumb bulb. Do you know which?
Second question:
When you press the top button, does it ever cut power to the bulb?
Third:
What does the top button do by default?
Fourth:
Can you confirm if each button press sends the exact same info to the ST hub?
(or does it alternate? on/off etc)
I apologize for all the questions. Good code needs good understanding.