WLED integration using Preset drop-down rather than Effects list

Since HA only uses one drop-down for the Light entity, it may make more sense to have that select from the Preset list rather than the Effects. This would be most similar to how the Nano Leaf Aurora works with HA because there are so many variables associated with an Effect.

Typically I have been setting up all of my WLED lights with the MQTT Light integration so that I can pick from presets for the Effect drop-down and I find that way more useful.

I would guess this is on the roadmap. The WLED integration is still a work in progress, it looks like Palette control from Home Assistant is coming in .117 and I would guess that loading presets will come in the future.

1 Like

Hey all,

I can see the SERVICE WLED.PRESET in the WLED doco, but cant see any of my presets being pulled into HA.

How does it work?

Thanks :slight_smile:

service: wled.preset
target:
  entity_id: all
data:
  preset: "16"

1 Like

Right, so it doesn’t automatically come in. I have to call them,

So if I add that to an automation… Do you have a code example for an automation?

Thanks mate, appreciate that :slight_smile:

  alias: liz_chritmas_lights_on
  description: ''
  trigger:
  - platform: state
    entity_id: switch.sonoff_10010e6
    to: 'on'
  condition: []
  action:
  - service: wled.preset
    target:
      entity_id: all
    data:
      preset: '16'
  mode: single

Yeah cool!

That helps a lot, thanks for that, I can see it :slight_smile:

1 Like

Just saw now that I spelled christmas wrong :rofl: :rofl: :rofl:

:rofl: :rofl:

Here is another one using the wled light name to set to the present (14)

  alias: liz_christmas_lights_off1
  description: ''
  trigger:
  - platform: state
    entity_id: switch.sonoff_10010e64
    to: 'off'
  condition:
  - condition: time
    after: '17:00'
    before: '21:59'
  action:
  - service: light.turn_off
    data: {}
    entity_id: light.christmas
  - service: light.turn_off
    data: {}
    entity_id: light.mesa
  - service: wled.preset
    target:
      entity_id: light.sala
    data:
      preset: '14'
  mode: single

Just make the automation using the UI and select edit as yaml when in action. copy and paste my first code. Just change your entity and preset

Thanks mate!

I put this together, but will have to wait till I get home to test it.

alias: Plasma
description: WLED TV Strip Preset
mode: single
trigger:
  - platform: device
    type: turned_on
    device_id: ed99e68c8d06bbc45116f44ea7695c41
    entity_id: light.tv_strip
    domain: light
condition: []
action:
  - service: wled.preset
    data:
      preset: '2'
    entity_id: 'light.tv_strip'
2 Likes

Going through WLED feature requests and noticed this one. This one has already been implemented: WLED now provides a drop-down for presets (a select entity).

Hi frenck @frenck , thanks for all your work :kissing_heart:

I think why some people are being confused or asking for preset drop-down list is because if you add a WLED device through the auto configure/auto discovered option you don’t get the preset entity. If you add it through selecting “+ Add Integration” manually and putting in your IP address of that device you will get the presets entity and a lot of other entity’s.

Try uninstalling (delete) a WLED device, restart HA, then add it through auto discovery/configure (and see the entity’s you have) then uninstall (delete) the device and then “+ Add Integration” manually. Now check your entity’s, you will have a preset option and more.

I have also found if you are getting light effects that are flickering or ESP becoming unavailable, click the restart press button and it fixes it (I Don’t know why… its magic).

Hope this helps :grinning:

That sounds like an issue. Did you file an issue with a reproduction scenario?
I haven’t heard that one before.

@frenck no I haven’t not sure how to do that. I just tested it again twice (regarding preset entity’s) and it did it both times. I am on the latest of everything (all up to date on HA and WLED). RE; the restart press button. You only have to do it once when you install the device and it fixes the flickering or ESP becoming unavailable. How I found it… install a new WLED device (don’t push the restart button) try putting a effect with the LED’s moving smoothly. Every now and then you will see a flicker… push the restart and it will never happen again unless you delete the device and reinstall it.

It would be nice if WLED also provides a drop-down for all effects and a select entity, just as with the presets as they like to test out new effects. I do not want to let my family in to the wled webgui with admin rights :slight_smile:
I started trying to build a input select: set options helper, building an input select from the wled.light attribute called effects_list, but it does not seem to be so simple as i expected, trying to add [{{ states.light.wled.attributes.effect_list }}] as the option to the input select: set options.
Thinking about building a loop, but maybe easier to implement the list at the source? :slight_smile:

4 Likes

This seems like a no brainer. Surprised no one has tackled this within the integration.

Effects drop down with the effects colour from wled would be awesome.