Mpd: specify source_list instead of media_content_id?

Hi everybody,

I am currently working on an NFC remote control for an mpd type media_player entity. I will scan a tag via PN532 reader, then set an input_text entity to the value of the tag read, for example B6-C5-03-31 or 04-03-43-12-62-3E-81 (using different types of tag).

There will be a sticker tag like this on some CDs in my CD board, and when they are scanned, I want the appropriate album to play. While I thought of using a database with “key: tag, value:artist/album”, I don’t really know how to do this in Home Assistant without an incredibly long template sensor… the value of this template sensor could be used for media_content_id, however, it’d have to be parsed a bunch, because my folders look like this

media_content_id: music/beets/The Lennons/Der Weg nach Eden/01 Sprechen Sie jetzt.mp3 # Music in beets folder
# OR
media_content_id: music/collection/Misfits/American Psycho (1997)/Misfits - American Psycho - 01 - Abominable Dr. Phibes.flac # Music in collection folder
# OR
media_content_id: audiobooks/George Carlin/A Place for My Stuff!/01 Acknowledgments.flac # Audio books
# OR
media_content_id: audiobooks/Hörspiele/Jack Slaughter/F05 - Am Ende der Welt/01 Am Ende der Welt.mp3 # radio play / audio play (not sure what this is in English; instead of one person reading a book, it is multiple voice actresses/actors reading each individual role)

So I thought instead of parsing the output at all, I could just create a playlist per album. If I want “The Lennons - Der Weg Nach Eden”, I’ll save all tracks in an mpd playlist titled B6-C5-03-31, then when tag B6-C5-03-31 gets scanned, I’ll just instruct Home Assistant to play the mpd playlist B6-C5-03-31.

Is this somehow possible? Or could you recommend another way? I could also write values to those NFC stickers, but while I could write artist/albumname to the tag, it’d still not solve the issue of determining the exact media_content_id value, which might always have a different path.

Thank you in advance for your ideas :slight_smile: