Random Color On Button Push


#1

I put a lightstrip under my son’s bed. I’d like to give him a button that will change to a random color with each push. Is this do-able with webCore?


#2

yes. did you mean a physical ST connected button or a virtual button in the ST app?


#3

Physical, I have an extra Iris button I’d like to use.


#4

This might work.

You may need to change turn on to set level 100% depending on the make of light. Or it may turn on to a lower (previous value). May even need to change it so the set color random is first.


#5

If I have a separate switch for on/off can I just take out the “Turn on” and it will set the color only when the light is already on?


#6

Yeah that should still work.


#7

heres another version that will give the kid a bit of a light show every time the button is pushed. :slight_smile:

the first repeat do … until … end repeat just makes sure the new color is sufficiently different from the current hue of the light strip.


#8

Thanks guys. I gotta say the colors on the Lightify lightstrips seem very dull to me compared to Philips Hues.


#9

sure thing. yes hues definitely have a richer color.