Skip to content

Commit c7b476e

Browse files
committed
docs: finding media_content_id
1 parent c67c1c7 commit c7b476e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,30 @@ It is recommended to install this one in HACS GitHub - elax46/custom-brand-icons
339339

340340
![device_icons.png](https://github.com/punxaphil/custom-sonos-card/raw/main/img/device_icons.png)
341341

342+
## Finding media_content_id (used in Custom Favorites)
343+
344+
If you want to find the `media_content_id` for a specific radio station or playlist (for instance to configure `customFavorites`), you can do the following:
345+
1. Open Media tab
346+
2. Open Chrome Dev Tools
347+
3. Go to Network tab
348+
4. Filter on "WS"
349+
5. Reload page
350+
6. Now you will see a row `websocket`, click on `websocket`
351+
7. Select Messages tab
352+
8. Add filter `play_media`
353+
9. Now navigate to your playlist, and start playing it
354+
10. A line will appear, click on it
355+
11. Expand the JSON object, and look under `service_data`
356+
There you will see something like:
357+
```
358+
entity_id: "media_player.kok"
359+
media_content_id: "spotify://8fb1de564ba7e4c8c4512361860574c83b9/spotify:playlist:1Oz4xMzRKtRiEs51243ZknqGJm"
360+
media_content_type: "spotify://playlist"
361+
```
362+
363+
![media_content_id.png](https://github.com/punxaphil/custom-sonos-card/raw/main/img/media_content_id.png)
364+
365+
342366
## CSS Styling
343367

344368
The recommend way to change look and feel is to use the built-in theming capabilities in Home Assistant. If that is not enough this card supports being styled with [card_mod](https://github.com/thomasloven/lovelace-card-mod).

img/media_content_id.png

3.97 MB
Loading

0 commit comments

Comments
 (0)