Help with Templating WLED

Hi,

I’m just getting used to templates.
I have already understood some of the basics.

Since the new update it is possible to use a selection field for the effects for WLED.

Can someone explain how to use this?

# Example select entity that extracts effects from a light.
# When you change the selected option, the effect of the light changes.
template:
  select:
    - name: "Example select: WLED effect"
      state: "{{ state_attr('light.wled', 'effect') }}"
      options: "{{ state_attr('light.wled', 'effect_list') }}"
      select_option:
        service: light.turn_on
        target:
          entity_id: light.wled
        data:
          effect: "{{ option }}"

How can I use this template to get a selection field in the frontend?

Thx for help.
Regards
Herbert

Copy it into your configuration.yaml or - if you use it - your packages directory.

Hi thanks.

I have already copy it to my template.yaml

sensor:
  Wasserverbrauch:
    unit_of_measurement: "Kubikmeter"
    value_template:   {{ (states('sensor.wasserzaehler') | float - 400) | round(2) }}

select:
  - name: "Example select: WLED effect"
    state: "{{ state_attr('light.budenbeleuchtung', 'effect') }}"
    options: "{{ state_attr('light.budenbeleuchtung', 'effect_list') }}"
    select_option:
      service: light.turn_on
      target:
        entity_id: light.budenbeleuchtung
      data:
        effect: "{{ option }}"

But how can i access this WLED Effect on my FrontEnd?
The other Sensor i can access in HA.

Simply add a new card with your new entity.

—————————————————————-

neue Karte hinzufügen —> Karte auswählen nach Entität —> in das Suchfeld eingeben: WLED —> Kästchen links anklicken —> unten rechts weiter klicken —> Auswahl treffen

Are you aware you can select the effect without creating the template sensor?

It is available at the bottom of the WELD light more-info pop up when the light is on:

Shame on me :roll_eyes:

I must have commented out the template config file while testing a few things. That’s why I couldn’t find the template.

Now i have found it.

Thanks :wink:
Regards
Herbert

Hi,

yes, i know that. But on my mobile this field is very tiny and i can’t scroll it.

Fair enough. Just checking.

:grin: Happens.