The spotcast.start service allows you to control Spotify playback on various devices from Home Assistant. You can target devices using a spotify_device_id, a device_name (friendly name), or an existing Home Assistant entity_id.
Common Usage Patterns
1. Start playback with a specific URI
Use a uri (track, playlist, or album) to start specific content. You can also use random_song: true to start at a random position in a playlist.
2. Search for content
Instead of a URI, you can provide a search query. This will be resolved into a URI (e.g., an artist or track name).
3. Transfer current playback
To move whatever is currently playing on a user's account to a new device, omit the uri parameter. Use force_playback: true to ensure playback continues even if nothing is currently active.
4. Play podcasts
Use a Spotify 'show' URI. Use ignore_fully_played: true to skip episodes the user has already heard.
5. Use multiple accounts
If you have configured multiple accounts in your secrets.yaml, specify the account key to use a non-default account.
# Start playback on a specific device using a URI
- service: spotcast.start
data:
spotify_device_id: "ab123c5d7347324c2b1234567890f8d6dc40350"
uri: "spotify:playlist:5xddIVAtLrZKtt4YGLM1SQ"
random_song: true
# Transfer current playback to a device by name
- service: spotcast.start
data:
device_name: "Speaker kitchen"
force_playback: true
# Start playback using a different configured account
- service: spotcast.start
data:
account: "niklas"
device_name: "Speaker kitchen"
uri: "spotify:playlist:5xddIVAtLrZKtt4YGLM1SQ"