Creating reusable wled script

Hello,
Im trying to create a reusbale wled script which will have input variables such as effect, brightness, intensity, speed, color

here is my initial script, so please contribute to create awesome script, and later on to announce it as a blueprint.

alias: Wled set light
fields:
  entity:
    description: 'entity for light on service'
    example: 'light.bathroom_wled'  
  speed:
    description: 'speed of wled effect'
    example: '100'
  speed_entity:
    description: 'entity for speed number wled'
    example: 'number.wled_lr_below_tv_speed'
  intensity:
    description: 'intensity of wled effect'
    example: '60'
  intensity_entity:
    description: 'entity for intensity number wled'
    example: 'number.wled_lr_below_tv_intensity'
  palette_entity:
    description: 'sets wled palette'
    example: 'select.wled_lr_below_tv_color_palette'
    default: 'Default'
  brightness_light:
    description: 'Sets the brightness'
    example: '100'
    default: 100
  rgb:
    description: 'Sets the colors'
    example: '100,242,100'
    default: '100,100,100'
  effect:
    description: 'sets effect'
    example: 'Twinkle'
    default: 'Solid'
    
sequence:
  # - choose:
  #   - conditions: '{{ if speed_entity is defined}}'
  #     sequence: 
        - service: light.turn_on
          target:
            entity_id: "{{ entity }}"
          data:
            brightness: "{{ brightness_light }}"
            # rgb_color: > 
            #   - '{{ rgb.split(",")[0].strip() | default(100, true) | int }}'
            #   - '{{ rgb.split(",")[1].strip() | default(50, true) | int }}'
            #   - '{{ rgb.split(",")[2].strip() | default(200, true) | int }}'  
            effect: "{{ effect }}"

        - service: select.select_option
          target:
            entity_id: "{{ palette_entity }}"
          data:
            option: "{{ state_attr('palette_entity', 'options') | random }}"

        - service: input_number.set_value
          target:
            entity_id: "{{ speed_entity }}"
          data:
            value: "{{ speed }}"
    # - conditions: '{{ if intensity is defined}}'
    #   sequence: 
        - service: input_number.set_value
          target:
            entity_id: "{{ intensity_entity }}"
          data:
            value: "{{ intensity }}"

What do you think? should I add something more here?
*This script is not tested, just wrote it from my head, so it’s probably broken

1 Like

I would like a blueprint/script for easily callings effects based on actions, especially spotify songs, I found this post when searching for examples of what others have done as the ones I have tried to implement do not work.

Would be great to have a script that allows you to update the current state of your wled for x seconds and then come back to the previous configuration.
It would be useful to use our wled to notify us about some events (Someone ringing the doorbell, your hose is currently consuming more than x KWh…)