treban/pimatic-tradfri

Color percentage is shown wrong in Pimatic

sverrevh opened this issue · 3 comments

It seems that there is something wrong with the color percentages as they are shown in Pimatic. When setting the color it does seem to set the lamp to the right color %, but the color % is shown wrong in Pimatic. If you slide it to 20, it jumps back to 12, but it did set it to 20%. If you slide it to 25% it jumps back to 18% in pimatic.

20%->12%, 30%->23%, 40%->34%, 50%->45%, 60%->57%, 70%->68%, 80%->80%, 90%->91%.

offset: -8%, -7%, -6%, -5%, -3%, -2%, 0%, +1%

I think there is some kind of error in a formula for calculating the % reported back by the gateway.

This is likely introduced by v0.1.12, but I only noticed now as I upgraded from 0.1.11 to 0.1.14

I have the same bug. I changed with the RGB Bulbs the calculation function.
..will fix it

Version 0.1.15 should fix the bug

Thanks for the quick fix! It now works as expected again.