Skip to content

Commit 358c1ee

Browse files
Update Spotify documentation including playlists (home-assistant#15462)
* Update Spotify documentation including playlists Improve English language use for readability; add example of play_media with Spotify playlist; add note about playlists not working on Google Nest Home devices. * Improve Spotify documentation after feedback Remove note about Google Home not working, fix code block
1 parent 150e11b commit 358c1ee

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

source/_integrations/spotify.markdown

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ The Spotify media player integration allows you to control [Spotify](https://www
2020
- Spotify application configured for Home Assistant (see [below](#create-a-spotify-application))
2121

2222
<div class='note'>
23-
Spotify integrated media controls (pause, play, next, etc.) requires a Premium account.
24-
If you do not have a Premium account, the integration's frontend will not show the controls.
23+
Spotify integrated media controls (pause, play, next, etc.) require a Premium account.
24+
If you do not have a Premium account, the frontend will not show the controls.
2525
</div>
2626

2727
### Create a Spotify application
2828

2929
- Login to [Spotify Developer](https://developer.spotify.com).
3030
- Visit the [My Applications](https://developer.spotify.com/my-applications/#!/applications) page.
3131
- Select **Create An App**. Enter any name and description.
32-
- Once your application is created, view it and copy your **Client ID** and **Client Secret**, which are used in the Home Assistant configuration file.
33-
- On the Spotify page, enter the **Edit Settings** dialog of your newly created application and add a *Redirect URI*:
32+
- Once your application is created, view it and copy your **Client ID** and **Client Secret**, which are used in the Home Assistant [configuration file below](#configuration).
33+
- Enter the **Edit Settings** dialog of your newly-created application and add a *Redirect URI*:
3434
- If you are not using SSL: `http://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback`
3535
- If you are using SSL: `https://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback`
3636
- Click **Save** after adding the URI.
@@ -52,18 +52,18 @@ spotify:
5252
5353
{% configuration %}
5454
client_id:
55-
description: Client ID from your Spotify application.
55+
description: Client ID from your Spotify Developer application.
5656
required: true
5757
type: string
5858
client_secret:
59-
description: Client Secret from your Spotify application.
59+
description: Client Secret from your Spotify Developer application.
6060
required: true
6161
type: string
6262
{% endconfiguration %}
6363
6464
## Activating the Spotify integration
6565
66-
- Go to the **Configurations** page in the Home Assistant frontend.
66+
- Go to the **Configuration** page in the Home Assistant frontend.
6767
- Click on **Integrations**.
6868
- Click the orange **+** on the bottom-right.
6969
- Click on "Spotify".
@@ -72,29 +72,40 @@ client_secret:
7272
<div class='note'>
7373
7474
If you receive an `INVALID_CLIENT: Invalid redirect URI` error while trying to
75-
authenticate with your Spotify account, make sure to check the Redirect URI in
75+
authenticate with your Spotify account, check the Redirect URI in
7676
the address bar after adding the new integration. Compare this value with the
7777
Redirect URI defined in the Spotify Developer Portal.
7878

7979
</div>
8080

8181
## Using multiple Spotify accounts
8282

83-
The integration support multiple Spotify accounts at once. You don't need to
83+
This integration supports multiple Spotify accounts at once. You don't need to
8484
create another Spotify application in the Spotify Developer Portal and no
8585
modification to the `configuration.yaml` file is needed. Multiple Spotify
8686
accounts can be linked to a _single_ Spotify application.
8787

88-
To add an additional Spotify account to Home Assistant, repeat _only_ the steps
89-
in the [Activating the Spotify integration](#activating-the-spotify-integration)
90-
section. However, make sure you go to the Spotify website and log out before
91-
you do so.
88+
To add an additional Spotify account to Home Assistant, go to the Spotify website and log out, then repeat _only_ the steps
89+
in the [Activating the Spotify integration](#activating-the-spotify-integration) section.
9290

93-
## URI Links for Playlists
91+
## Playing Spotify playlists
9492

9593
You can send playlists to Spotify using the `"media_content_type": "playlist"`, which is part of the
96-
[media_player.play_media](/integrations/media_player/#service-media_playerplay_media) service.
97-
The `media_content_id` can be obtained from the Spotify desktop-app by clicking on the more options ("...") next to the album art picture, selecting "share" and then "Copy Spotify URI" or "Copy Playlist Link" (also available in the Spotify phone and web app).
94+
[media_player.play_media](/integrations/media_player/#service-media_playerplay_media) service, for example:
95+
96+
```yaml
97+
# Example script to play playlist
98+
script:
99+
play_jazz_guitar:
100+
sequence:
101+
- service: media_player.play_media
102+
data:
103+
entity_id: media_player.spotify
104+
media_content_id: 'https://open.spotify.com/playlist/5xddIVAtLrZKtt4YGLM1SQ?si=YcvRqaKNTxOi043Qn4LYkg'
105+
media_content_type: playlist
106+
```
107+
108+
The `media_content_id` value can be obtained from the Spotify desktop app by clicking on the more options ("...") next to the album art picture, selecting "Share" and then "Copy Spotify URI" or "Copy Playlist Link" (also available in the Spotify phone and web app).
98109

99110
## Unsupported Devices
100111

0 commit comments

Comments
 (0)