WLED - Simple script help

I’ve just started out with WLED, with one Athom controller running a single LED strip. Literally just got it all connected and integrated to HA but I am struggling to get anywhere with a simple turn on in scripts.

At the moment I want a simple script to turn the light on (no effects) at a specific brightness and colour but it’s not working.

Can anyone please help out?

Current script:

kitchen_day:
  alias: Kitchen Day
  sequence:
  - service: light.turn_on
    data:
      entity_id: light.worktop_light_right
      rgb_color:
      - 240
      - 215
      - 170
  - service: number.set_value
    data:
      entity_id: number.worktop_light_right_intensity
      value: 240

That is not the brightness. It is the effect intensity. Try this:

kitchen_day:
  alias: Kitchen Day
  sequence:
    - service: light.turn_on
      target:
        entity_id: light.worktop_light_right
      data:
        effect: solid
        brightness: 240
        rgb_color:
          - 240
          - 215
          - 170
1 Like

Thanks Tom, but that isn’t working either.

I did try pretty much your whole script earlier but I hadn’t added the effect but the script is
still not running when the automation is triggered. Nothing in logs.

I just wrote this script for my wled lamp:

wled_test:
  sequence:
    - service: light.turn_on
      target:
        entity_id: light.kerf_lamp
      data:
        effect: solid
        brightness: 240
        rgb_color:
          - 240
          - 215
          - 170

Called it from dev tools services and it worked perfectly.


.

So there is nothing wrong with your script (assuming th entity id is correct).

Did you reload scripts after writing it?

How are you calling the script?

What related errors are in your log?

1 Like

Sorted now, @tom_l

I had reloaded the scripts in Dev Tools but, for some reason it needed a restart instead.

Thanks for your help.

Is this the first time you have used scripts?

Not at all, no. But in the past, on a couple of occasions, I’ve found that an automation or script has required a restart instead of dev tools reload.