Automation with Input Select

Hey All,
I am looking for some example automations that use an Input Select as a variable.
My intent is that each time the automation get’s triggered it uses the next Input Select Value as the variable. The purpose of this is to use a single pushbutton to select a different media player playlist each time the pushbutton is pressed. As an example I may have different playlists that are available as an Input Select (already done). If I press the button then the next available playlist (input select) will play. If I press the button again then the next playlist (input select) will play. Once I get to the end of the Input Select Values it will start again at the first playlist (input select) value.
Ideas? thoughts? examples?

Just add the service to your automation to step through the select’s options:

service: input_select.select_next
data: {}
  entity_id: input_select.xxxxx

Sometimes the best solutions are the simplest ones. :+1:
Thanks for this, will mark it as a solution as soon as I get it implemented.

This was the magic…
Thanks for pointing me in the correct direction @Didgeridrew

      - service: input_select.select_next
        data: {}
          entity_id: input_select.playlists
      - service: media_player.select_source
          source: '{{states.input_select.playlists.state}}'
          entity_id: media_player.volumio