I have setup some basic automations for testing where when a PIR detects movement it will turn on an LED strip (controlled via WLED), set it to Red for 3 seconds, then turn it off again.
What I would like to do if it is already turned on though is to check what effect is being used (e.g. Colortwinkles), set it to to Red for 3 seconds, then set it back to the original pattern.
You can do this using scene.create service. In your automations just add the first action as calling serivce scene,create. In the service data tab add this
scene_id: wled
snapshot_entities: light.wled
Please change the entity name to yours.
Then make the final action to call the service scene.turn_on and make the service data like below.
entity_id: scene.wled
This is restore the original state of the light including the effect. If you need any more help Please share the automation yaml.