Light Effects Dropdown in HADashboard

How would I make a dropdown with all the Light Effects a light has?

Had exactly the same question. Wanted a dropdownlist directly on the dashboard. Made the following solution:

Added this to my configuration.yaml:

input_select:
  wled_effects:
    name: "Wled Effects"
    icon: mdi:led-strip
    options:
      - Solid

Then added the following to my automations.yaml:

- alias: add effects for wled custom input
  id: 2ebl8158-8s53-8726-9474-1633087235331
  trigger:
    - platform: homeassistant
      event: start
  action:
    - service: input_select.set_options
      target:
        entity_id: input_select.wled_effects
      data:
        options: >
          {{ state_attr('light.wled', 'effect_list') }}
    - service: input_select.select_option
      data:
        option: >
          {{ state_attr('light.wled', 'effect') }}
      target:
        entity_id: input_select.wled_effects

- alias: set effect after change for wled custom input
  id: 2ebl8158-8s53-8726-9474-16235331
  trigger:
    - platform: state
      entity_id: input_select.wled_effects
  action:
    - service: light.turn_on
      target:
        entity_id: light.wled
      data:
        effect: "{{ states('input_select.wled_effects') }}"

Please comment if there is a better way. Maybe the best way is to add this option to the WLED integration in Core (core/select.py at dfcadd600c1fb44de44a09b45c6b7312aeadaccf · home-assistant/core · GitHub).

1 Like