Add shuffle support for artist radio/dynamic playlists

- Add shuffle_on and shuffle_off actions to control_playback function
- Update prompt to automatically enable shuffle when playing artists
- Add artist radio mode feature to README
- Update all example configurations with shuffle support
- Simplify control_playback YAML syntax (if/then vs choose/conditions)
- Add shuffle examples to voice command demonstrations
This commit is contained in:
Chad Auld committed 2025-11-16 12:28:20 -07:00
1 parent 547281a69e
commit ec0bcd174d
3 files changed
+179 -89

No files matched your search

+20 -2
View File
@@ -53,13 +53,13 @@
- spec:
name: control_playback
description: Control music playback (pause, resume, stop, next track, previous track, set volume)
description: Control music playback (pause, resume, stop, next track, previous track, set volume, shuffle)
parameters:
type: object
properties:
action:
type: string
enum: [pause, play, stop, next_track, previous_track, volume_set]
enum: [pause, play, stop, next_track, previous_track, volume_set, shuffle_on, shuffle_off]
description: Playback control action
media_player:
type: string
@@ -118,3 +118,21 @@
entity_id: "{{ media_player }}"
data:
volume_level: "{{ volume_level / 100 }}"
- conditions:
- condition: template
value_template: "{{ action == 'shuffle_on' }}"
sequence:
- service: media_player.shuffle_set
target:
entity_id: "{{ media_player }}"
data:
shuffle: true
- conditions:
- condition: template
value_template: "{{ action == 'shuffle_off' }}"
sequence:
- service: media_player.shuffle_set
target:
entity_id: "{{ media_player }}"
data:
shuffle: false
+2 -1
View File
@@ -2,5 +2,6 @@ Music Playback:
- When asked to play music, follow this two-step process: 1) Call search_spotify to get the Spotify URI, 2) Call play_music with the URI and media player entity
- Available media players: media_player.kitchen_speaker, media_player.living_room_speaker (customize with your actual entity IDs)
- Parse commands like "Play {Artist/Album/Track}" and determine the media type automatically (artist, album, or track)
- For playback control (pause, skip, volume), use the control_playback function
- IMPORTANT: When playing an artist, always enable shuffle after starting playback by calling control_playback with action: shuffle_on to create a dynamic playlist experience
- For playback control (pause, skip, volume, shuffle), use the control_playback function
- Always use natural language interpretation - users will say things like "play Coldplay" not "search for artist Coldplay"