TP-Link light can't set brightness via automation

hello,
I am using the following automation to turn on a floor light with a PIR sensor.
Everything works as expected apart that I can’t set brightness to the desired level.

Is pretty strange, as I am using the same configuration under Developers Tools/Services and it works, but when I try it within an automation it doesn’t.

- id: '1612453345741'
  alias: Baby motion automation
  trigger:
  - platform: state
    to: 'on'
    from: 'off'
    entity_id: binary_sensor.sigma_pir_baby
  condition:
  - condition: or
    conditions:
    - condition: sun
      after: sunset
    - condition: sun
      before: sunrise
  - condition: state
    entity_id: light.baby_lamp
    state: 'off'
  action:
  - service: timer.start
    data:
      duration: '0'
    target:
      entity_id: timer.baby_room_occupancy
  - service: light.turn_on
    data:
      brightness_pct: 30
      entity_id: light.baby_lamp
    target:
      entity_id: light.baby_lamp
  - service: input_boolean.turn_on
    target:
      entity_id: input_boolean.baby_room_auto_motion

I have tried both brightness_pct and brightness without effect.
Any help or feedback would be appreciated.

Anyone please?

I can’t believe that there is no one who had the same experience.
Anyone please? I need to solve this

What type/model of bulb is it? Why do you have the entity listed under both target and data? Did you check the log for errors after attempting to fire the automation ? Try making an automation with the just the light action and see if it works… you seem to have a lot going on there…

You’ve got the entity under target and data.
Maybe target is taking preference. Try deleting the target line

thank you for your reply.
The model is TP-Link KL60

I have the entity listed under target and data because this is what I get when I test it under Developers Tools/Services.

The same code which works, I use for the automation but it doesn’t work.

thank you for your quote.
the entity_id goes under target.
Under developer tools/services when I test it shows under target.

Because when used the same script at automation it didn’t work I tried different things.
One of them was to have entity_id under data too.

Unfortunately it didn’t make a difference.

So that bulb is not listed as being supported… https://www.home-assistant.io/integrations/tplink/
I would, as I mentioned try an automation with just the turn_on service and using the format in the documentation… but also I did come across this thread… maybe worth a shot trying to have two actions, one for the on and one for the brightness… ??
TP-link bulb data on 'turn_on' not happenning?

there is no “set brightness” for tplink in integration. only increase/decrease brightness by unknown value.