First of all, sorry for possible spelling errors, english is not my first language Hopefully this is in correct category.
I already have working light switch which you can use to change bulb colors using the following template:
{{ (30 + (state_attr('light.tradfri_makuuhuone_lamppu_1', 'hs_color')[0] or 0)) % 360 }}
It circles around the color wheel just like it should be, but no matter what math compilation I try, I just canât get it to circle counter clockwise. My math skills just are not enough to solve this on my own.
I have TrÄdfri switch with left & right switches and would like it to circle clockwise when pressed right (Which works fine) and counter clockwise when pressed left (No clue how to get it work).