TP-link bulb data on 'turn_on' not happenning?

Heya guys,

Running some tests (against TP-link LB130) and I’ve found that turning the bulb on using the “light.turn_on” domain-service doesn’t accept any “data”, so the brightness, white-temperature, color, etc… are not going through unless the bulb is already on.
Which confuses me since the Kasa application turns a light on as red.

So, I am thinking that the Kasa app sends the settings first, and then turns the light on (eg: change color to ‘red’, then turn the circuitry on to turn on the LEDs)… Only homeassistant doesn’t seem to like trying to send data to a light without it already being on… Which seems strange to me - the device is there and listening, why wouldn’t you be able to send it a command to either get stuff (like wattage / status) or to set stuff (like set the color in preparation of turning on) ?

But anyway, I was wondering if it was an issue with me specifically or if anyone else had noticed that the data section doesn’t seem to be getting done in the 1 “call service” node, and would actually take 2 of them (1 to turn on, the other to change the color).

Also, with TP-link bulbs, they save the last state they were in, so it has an option to come back on with the last color it had/has in that storage (a setting that can be changed through kasa, without turning the light on, and if the network goes down then bulbs still obey it).

Perhaps I’ve missed something here?
Maybe I should be using a different service / domain?


Paul Sanders

I’ve had this issue too, in my automations I’ve ended up calling turn on twice, the second time with data. I assumed I’d done something wrong to be honest.

I’m pretty sure my automation used to work though…

Since this is the case, I think I’m gonna have to employ my own on/off toggle logic in 2 actions (1 to turn on, then the other to adjust the settings to correct values, the other to reduce brightness to 1% before turning it off (that way the small flash before getting the right settings will be less noticeable).

Did you ever work this out? I just looped in my bulbs and have been wondering why none of my entry commands were working and repeat of the command resolved
makes sense now.

This is still an issue for me as well. Making two service calls as described above is a valid workaround, but it would be nice if it could be turned on and adjusted all in one go, eliminating the flashes of varying brightness.

Does anyone know if this is an issue with the way HA interacts with TP-Link lights, or if it’s a limitation of the TP-Link API?