Instructions for deriving media-source:// from Media Browser URL (#38252)

Co-authored-by: Shay Levy <levyshay1@gmail.com>
This commit is contained in:
Will T 2025-04-15 08:01:22 +12:00 committed by GitHub
parent 243ad77226
commit 942198773c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,3 +97,18 @@ data:
``` ```
[basic-configuration]: /integrations/homeassistant/#media_dirs [basic-configuration]: /integrations/homeassistant/#media_dirs
### Identifying a media source from the media browser
If you wish to make use of the `media-source://` URI for an action, and the media is already available in the media browser (either as locally stored on the Home Assistant machine, or mapped using network storage) the following steps can help to determine the `media-source` uri.
1. Select **Media** in the sidebar.
2. Navigate to the folder containing the media you wish to play.\
*In this example, we will go **My media** > **NAS_Media**. This folder is a network share containing a collection of .mp3 files. One of which is named `my-music.mp3`.*
3. Copy the current URL from the URL bar.\
*for example: `https://home-assistant.local/media-browser/browser/app%2Cmedia-source%3A%2F%2Fmedia_source/%2Cmedia-source%3A%2F%2Fmedia_source%2Flocal%2FNAS_Media`*
4. Search for an online URL Decoder, paste in the copied text and decode.\
*`https://home-assistant.local/media-browser/browser/app,media-source://media_source/,media-source://media_source/local/NAS_Media`*
The last media source, in this case `media-source://media_source/local/NAS_Media` makes up the first part of the path, with the complete path being:
`media-source://media_source/local/NAS_Media/my-music.mp3`