Add Transition Period to TP-Link Smartbulbs

I’ve discovered that the ability to set a transition period when adjusting the brightness/color/temp of my TP-Link bulbs is not available. From what I can tell the bulbs do support this capability, it just seems to be missing from the component.

Looking into this on other platforms I can see where a “transition_period” parameter is used in the JSON data sent to the bulb. It seems that we should be able to add this parameter in our Home Assistant component as well. I see where in the current component, the light_state is set on line 227 of the pyHS100/smartbulb.py file and is only sending the “on_off” parameter. Adding the “transition_period” parameter should resolve this request. I would add it in my own custom component but don’t have enough knowledge to know how to get the value from my Home Assistant command…

If anyone is willing and able to take on this minor update I’m sure many TP-Link bulb owners would be highly appreciative! :slight_smile:

This would be great.

I’ve been struggling with this also. Knowing that it should work but no matter how you config it just won’t. Count me in as one of the many… highly appreciative owners for any of the brave souls who can come up with a PR for this!

When https://github.com/home-assistant/core/pull/30719 gets done, it is possible to define (limited) transitions: on my KL60 bulb the max transition for turning it on is something like 5 seconds and for turning off up to 10 seconds).