# Trying to set up button to cycle through two different playlist

**URL:** <https://wled.discourse.group/t/trying-to-set-up-button-to-cycle-through-two-different-playlist/11485>\
**Category:** Questions\
**Created:** [March 30, 2024, 9:33pm UTC](https://wled.discourse.group/t/trying-to-set-up-button-to-cycle-through-two-different-playlist/11485 "2024-03-30T21:33:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![galle.led](https://avatars.discourse-cdn.com/v4/letter/g/96bed5/32.png) [@galle.led](https://wled.discourse.group/u/galle.led)\
**Post date:** [March 30, 2024, 9:33pm UTC](https://wled.discourse.group/t/trying-to-set-up-button-to-cycle-through-two-different-playlist/11485/1 "2024-03-30T21:33:40Z")

</div>

I have a single push button hooked up to an esp32, and two playlists in WLED with 10 presets in the first and 4 presets in the 2nd. I’d like a double press of the button to switch between the playlists, and a single press to move to the next pattern within each playlist.

Power on = Playlist 1  
double press = Playlist 2  
single press = Next pattern in playlist 2  
double press = back to playlist 1

so on and so forth…

according to [JSON API - WLED Project](https://kno.wled.ge/interfaces/json-api/) i could potentially set up a double press to cycle between presets 1 & 2 (where 1 and 2 are playlist 1 and playlist 2) with this command: {“ps”:“1~2~”}, but it is not clear how to make a single button press move to the next preset within the playlist

---

<div class="post-metadata">

**Author:** ![blazoncek](https://yyz2.discourse-cdn.com/free1/user_avatar/wled.discourse.group/blazoncek/32/1886_2.png) [@blazoncek](https://wled.discourse.group/u/blazoncek)\
**Post date:** [April 2, 2024, 7:25am UTC](https://wled.discourse.group/t/trying-to-set-up-button-to-cycle-through-two-different-playlist/11485/2 "2024-04-02T07:25:41Z")

</div>

playlist advancing by button press is not supported
