Hi @robinbervoets .
Thank you for trying my code change.
Did you change both occurences of “output_correction” to “set_output_correction”?
Additionally I think you need to restart home assistant after changing the code.
For me that had worked very well. Unfortunately this was not good enough for me. My DMX controllers already offer a “logarithmic” dimming curve which works better for me than the available dimming curves in this integration. Quadratic is still too steep and cubic/quadruple won’t switch on the light at all until I dim to a certain level (I think it was around 10%).
Maybe there will be an option in the future to implement individual dimming curves other than those that python already has.
By crawling the internet and finding 2 home assistant scripts I was able to gather a few dimming functions. Maybe those are of any help in the future.
Link to the scripts:
https://community.home-assistant.io/t/light-fader-with-curves-linear-exponential-and-smooth/366157
https://community.home-assistant.io/t/ashley-s-light-fader-2-0-fade-lights-and-or-color-temperature-with-your-choice-of-easing-curves-including-ease-in-ease-out-and-ease-in-out/584077
The formulas of some dimming curves:
(x = input value, a = total number of values [typically 256 or 65536])
| name | function |
|---|---|
| linear | y = x |
| logarithmic | y = 2^(log2(a-1) * (x+1) / a) |
| quadratic | y = (x / (a-1)) ^ 2 * (a-1) |
| cubic | y = (x / (a-1)) ^ 3 * (a-1) |
| quadruple | y = (x / (a-1)) ^ 4 * (a-1) |
| exp2 | y = (((((a^(1/2))-1) / (a-1)) * x + 1) ^ 2) - 1 |
| exp5 | y = (((((a^(1/5))-1) / (a-1)) * x + 1) ^ 5) - 1 |
| smooth | y = a ^ (x / (a -1)) - 1 |