What's the media player content id for a the entire local media folder?

I put like 3 sound clips in the media folder directly. All I want to do is:

  1. press button
  2. play random sound in my media directory

I’m trying to maybe hook it up as a playlist with shuffle enabled and every button press just go to next song or something? I can play a direct media file, but I can’t figure out how to play the directory. Am I missing something simple here?

this is my current yaml for playing a single file

action: media_player.play_media
metadata:
  title: sound_1.mp3
  thumbnail: null
  media_class: music
  children_media_class: null
  navigateIds:
    - {}
    - media_content_type: app
      media_content_id: media-source://media_source
data:
  media_content_id: >-
    media-source://media_source/local/sound_1.mp3
  media_content_type: audio/mpeg
target:
  entity_id: media_player.office

any thoughts?

Use the media picker in the visual automation editor. If you can pick the folder there, you will get its ID after switching to YAML mode. If you cannot pick the folder, then quite possibly it does not have an ID you can use.

it does not seem like you can add a folder to the media folder. so i have everything sitting at the root level.

if i edit my script above into this

action: media_player.play_media
metadata:
  title: sound_1.mp3
  thumbnail: null
  media_class: music
  children_media_class: null
  navigateIds:
    - {}
    - media_content_type: app
      media_content_id: media-source://media_source
data:
  media_content_id: >-
    media-source://media_source/local/
  media_content_type: audio/mpeg
target:
  entity_id: media_player.office

then it fails to save.