WLED fill percentage in scene

I have a WLED controlled ledstrip which I control using home assistant.
Most of the time it is showing the ‘Percent’ effect where it is filled partitially (128)

I have multiple automations where this led strip will show a different effect. For example when a call is incoming or when the doorbell is triggered. When the automation finished, it should return to the state it was before. (create snapshot scene, show effect, set snapshot scene again)

The correct effect will be selected again afterwards but the fill percentage is different, in this case value is 164 instead of 128. This means the effect looks completely different.

Is there some way to get this percentage included in the snapshot scene as well?

Does it update to the correct value when the sensor used for the percent value updates?

How are you applying that value?

With an automation like this?

trigger:
  - platform: state
    entity_id:
      - sensor.battery_percent_2
    not_to:
      - unknown
      - unavailable
condition: 
  - condition: template
    value_template: "{{ 0 <= states('sensor.battery_percent_2')|round(0)|int <= 100 }}"
action:
  - service: number.set_value
    data:
      value: "{{ states('sensor.battery_percent_2') }}"
    target:
      entity_id: number.wled_dragon_segment_1_intensity
mode: single

If so, there is no way to force that automation to update in a scene. However you can trigger it manually after calling the scene restore service using the automation.trigger service.

Thanks for your reply Tom.
I have create a preset in wled woth this effect a d the fill percentage.

When I turn on the light with a button, I simply set the preset for this led strip.

When the doorbell rings, I create a scene as snapshot and I want to activate that snapshot scene afterwards again so it is in the same state. Unfortunately in that case the value will be lost.

Selecting the preset manually again works as expected

I’m not sure you can set presets in scenes. If not then just call the service to set the preset after restoring your scene.