cellcortex / homebridge-yeelighter

Homebridge plugin for Yeelights - special focus on supporting features of ceiling lights
MIT License
98 stars 20 forks source link

Smooth Transition Between Colors #123

Open OzturkAlperen opened 2 years ago

OzturkAlperen commented 2 years ago

Hey there, with this plugin the bulb changes its color and brightness instantly, but with native HomeKit support of the Yeelight the bulb changes its color and brightness smoothly. I wonder if this can be implemented with this plugin. I prefer this plugin over the native support because with this plugin I can set the full brightness of my bulb using Home app while the native HomeKit integration doesn't let you set the boost mode brightness.

cellcortex commented 1 year ago

In principle we could also smoothly transition. I prefer having direct feedback when changing values in HomeKit. Can you elaborate a bit on how you would like change the brightness (e.g. is this in the home ui or some other tool)?

OzturkAlperen commented 1 year ago

For sure. I am solely speaking for Home app not for any other tool.

With this plugin when I change the brightness or the color the change happens instantly. But with the native implementation one can say that change happens in gradient.

For example if the brightness was at 50% before and I wanted to set it at 100%, with this plugin the jump is instant from 50% to 100%, however with the native implementation it changes the brightness by increasing it gradually with little steps, like from 50% to 51% then to 52% and so until it reaches the desired brightness (maybe with smaller or bigger steps not sure about that). And for the color part let's say that the current color is blue (0, 0, 255) and we want to change it to red (255, 0, 0). With native implementation it changes like (0, 0, 255) to (1, 0, 254) and then to (2, 0, 253) until it reaches the desired color (again maybe with bigger steps not sure about that either).

I think it would be very nice to see similar behavior from this plugin because it enhances the user experience in my opinion. A gradient transition rather than huge shifts in color and brightness seems better to human eye and feels more elegant.

By the way you said that you prefer having instant feedback but this behavior I am referring doesn't alter with the instantness of the process. It happens very quickly. Maybe in 1/4 - 1/2 of a second.