WLED control with automation, effect, intensity, speed, brightness

Hi
actually im trying to control WLED effects with an automation. but actually it is not working.

code loocks like this.

  action:
    - service: light.turn_on
      entity_id: light.wled_haus_master
    - service: light.turn_on
      data:
        entity_id: light.wled_haus_segment_3
        effect: "Halloween"
        brightness: '255'
        speed: '255'
        intensity: '255'

i get this message in the log

While executing automation automation.halloween_timer_eingangstur_licht_an_wenn_tur_auf_oder_bewegung
21:32:12 – Automatisierung (ERROR)
HALLOWEEN - Timer Eingangstür Licht an wenn Tür auf oder Bewegung: Error executing script. Invalid data for call_service at pos 2: extra keys not allowed @ data['speed']
21:32:12 – Automatisierung (ERROR)

what is wrong??

I think you might need to use the wled.effect service rather than light.turn_on according to the docs:

The light.turn_on service might work with just the brightness but not when you are trying to also set the effect, speed, and intensity which are specific to WLED.

i changed the code to this:

  action:
    - service: light.turn_on
      entity_id: light.wled_haus_master
    - service: wled.effect
      entity_id: light.wled_haus_segment_3
      data:
        #entity_id: light.wled_haus_segment_3
        effect: "Halloween"
        brightness: 255
        speed: 255
        intensity: 255

but still the same log entry.

I got it to work on my setup by playing around in Developer Tools:

If you look at the docs and parameters listed above then brightness is not supported, this is specified as service data with the light.turn_on service:

This kind of makes sense as brightness is already catered for in light.turn_on service and the new wled_effect service is specifically for the ‘effect’ only.

ok thanks for this.
i hope it will work, we will see:

  action:
  - service: light.turn_on
    entity_id: light.wled_haus_master
  - service: light.turn_on
    data:
      entity_id: light.wled_haus_segment_3
      brightness: 255
  - service: wled.effect
    data:
      entity_id: light.wled_haus_segment_3
      effect: Halloween
      speed: 255
      intensity: 255
    entity_id: timer.eingang_kurz

An update along the way fixed this for me. I got my wled sunrise alarm working with the info below in my automation action block.

service: wled.effect
data:
  speed: 1
  effect: sunrise
  intensity: 1
target:
  entity_id: light.counter

why I cannot find the service wled.effect?

where can I find the weed.effect service?

@Oggymator
Did you resolve this?
Same here, everything works with the integration but I am missing wled services.
looking for wled.effect and it isn’t listed under services, in fact nothing starting with wled.xxxxxx

edit : OK found this:

but still wondering why it doesn’t show up in the HA config UI:

image

but it does show in dashboards:

I’ve got the same problem here. I cant find any “effect” entity. However, all possible and the current effects are listed under the corresponding light entity for the WLED-Device. Dont know how to change the current effect though.

The active effect is listed as an attribute to the segment entity. But there is no control entity for effect.
It can be set either by clicking on the segment control (see my previous post) or via the light.turn_on action parameters.

so i can’t get mine to breathe red, the service call ignores the colour i’ve told it to turn on as (either RGB or colour name) and only applys the effect.
I’m loosing my mind here.
Not enought coffee

Hey!
If you’re struggling to set specific colors along with effects — I totally get the frustration :sweat_smile:

The default light.turn_on call in HA doesn’t always apply color + effect reliably, especially with complex WLED setups.

If you want full control over effect ID, colors, brightness, palette, and more — check out my custom integration:
:link: WLED Live View Proxy for Home Assistant

It lets you send raw JSON API commands directly to WLED over WebSocket — like this:

service: wled_liveviewproxy.send_command
data:
  targets:
    entity_id: light.wled_strip
  command: {"seg":[{"id":0,"on":true,"fx":2,"col":["ff0000"],"bri":255}]}

This way you can activate the “Breathe” effect (fx: 2) with solid red color (ff0000) — and it won’t be ignored :wink:

1 Like

This sounds like it would be perfert. Sometimes it works, most of the time it doesn’t. I’ve even changed automations to turn off the effect before doing things so its always “soils” ready for the next light.

1 Like