# Save current preset via JSON

**URL:** <https://wled.discourse.group/t/save-current-preset-via-json/4233>\
**Category:** Questions\
**Created:** [December 5, 2021, 9:11pm UTC](https://wled.discourse.group/t/save-current-preset-via-json/4233 "2021-12-05T21:11:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gasparirob](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/gasparirob/32/537_2.png) [@gasparirob](https://wled.discourse.group/u/gasparirob)\
**Post date:** [December 5, 2021, 9:11pm UTC](https://wled.discourse.group/t/save-current-preset-via-json/4233/1 "2021-12-05T21:11:32Z")

</div>

Hi, is there a way to save current settings (effect, palette, speed, intensity) to a new preset via JSON?  
The problem is I don’t know what is the last used preset ID, so I can’t do a psave.

TL;DR  
I have a Christmas tree with 200 leds. Wled installed and perfectly working. I’ve setup a script to randomize all settings. Then I’ve installed a Shelly 1 on my wall, so every time I click the fake light switch (there’s no light), my tree changes effects. And so far so good.  
Now I would like to put a nfc tag near the fake light switch, so when I see a very beatifull settings combination (effect, palette, speed, intensity) I put my phone near the fake light switch and save that settings to a new preset.

I’ve tried even the last release (0.13.0-b5 “Toki”) 'cause i read “JSON in/decrementing support for brightness and presets” but I didn’t succeed.
