Skip to content

Commit

Permalink
docs: merge custom favorites sections
Browse files Browse the repository at this point in the history
  • Loading branch information
punxaphil committed Dec 26, 2024
1 parent c7b476e commit 107028a
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,30 @@ customFavorites:
thumbnail: http://cdn-profiles.tunein.com/s24948/images/logoq.jpg?t=1
```
### Finding media_content_id (advanced)
If you want to find the `media_content_id` for a specific radio station or playlist, sometimes the above method is not enough. If so, you can use the following method to find it:
1. Open Media tab
2. Open Chrome Dev Tools
3. Go to Network tab
4. Filter on "WS"
5. Reload page
6. Now you will see a row `websocket`, click on `websocket`
7. Select Messages tab
8. Add filter `play_media`
9. Now navigate to your playlist, and start playing it
10. A line will appear, click on it
11. Expand the JSON object, and look under `service_data`
There you will see something like:
```
entity_id: "media_player.kok"
media_content_id: "spotify://8fb1de564ba7e4c8c4512361860574c83b9/spotify:playlist:1Oz4xMzRKtRiEs51243ZknqGJm"
media_content_type: "spotify://playlist"
```

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


## Dynamic volume level slider

The volume level slider is dynamically adjusting its scale. If volume is below 20% it will show a scale up to 30%. Above
Expand Down Expand Up @@ -339,30 +363,6 @@ It is recommended to install this one in HACS GitHub - elax46/custom-brand-icons

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

## Finding media_content_id (used in Custom Favorites)

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:
1. Open Media tab
2. Open Chrome Dev Tools
3. Go to Network tab
4. Filter on "WS"
5. Reload page
6. Now you will see a row `websocket`, click on `websocket`
7. Select Messages tab
8. Add filter `play_media`
9. Now navigate to your playlist, and start playing it
10. A line will appear, click on it
11. Expand the JSON object, and look under `service_data`
There you will see something like:
```
entity_id: "media_player.kok"
media_content_id: "spotify://8fb1de564ba7e4c8c4512361860574c83b9/spotify:playlist:1Oz4xMzRKtRiEs51243ZknqGJm"
media_content_type: "spotify://playlist"
```

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


## CSS Styling

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).
Expand Down

0 comments on commit 107028a

Please sign in to comment.