Hi All,
I’m no good at coding complex new ideas with HA (when they involve templates), but I think that’s the way to achieve an idea I have.
I want to set up a Xiaomi cube to run through the colours of a colour wheel when rotated so the colour of a light can be selected. I was thinking that the rotate function could increment the RGB numbers as per:
Start: RGB(244, 66 66) increment to RGB(244, 244, 66)
then decrement from RGB(244, 244, 66) to RGB(66, 244, 66)
then increment from RGB(66, 244, 66) to RGB(66, 244, 244)
then decrement from RGB(66, 244, 244) to RGB(66, 66, 244)
then increment from RGB(66, 66, 244) to RGB(244, 66, 244)
then decrement from RGB(244, 66, 244) to RGB(244, 66, 66) which gets it back to the starting point.
… with the ability to rotate the cube either direction to go through the colours in forward or reverse sequence.
I know its a lot to ask but the final product would be awesome if someone has the skills to help with the code. I already have code for the cube which I use to control volume but I’m not sure how to tackle the various number sequences required for this.
Thanks in advance for any help