Yandex smarthome: playlists as input_source + experimental Dialogs voice skill (v1.6.1)#3834
Open
trudenboy wants to merge 15 commits intomusic-assistant:devfrom
Open
Yandex smarthome: playlists as input_source + experimental Dialogs voice skill (v1.6.1)#3834trudenboy wants to merge 15 commits intomusic-assistant:devfrom
trudenboy wants to merge 15 commits intomusic-assistant:devfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR bumps the yandex_smarthome plugin to v1.5.0 and adds support for exposing configured MA library playlists as Yandex mode(input_source) values, enabling Alice voice commands to start playlist playback via player_queues.play_media.
Changes:
- Add “Exposed Playlists” configuration and plumb
playlist_uristhrough cloud/direct handlers and state notifier. - Extend device mapping to publish combined native sources + playlist-backed
mode(input_source)slots (capped at 10) and route mode actions to eitherplayers.select_sourceorplayer_queues.play_media. - Add a small
playlists.pyseam plus tests covering the new mode registration and action routing.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
music_assistant/providers/yandex_smarthome/__init__.py |
Adds config UI entry for selecting playlists and loads options from MA library. |
music_assistant/providers/yandex_smarthome/constants.py |
Introduces CONF_EXPOSED_PLAYLISTS and MAX_INPUT_SOURCES (10). |
music_assistant/providers/yandex_smarthome/device.py |
Implements combined input_source slots and executes playlist-backed mode actions via queue playback. |
music_assistant/providers/yandex_smarthome/direct.py |
Passes configured playlist URIs through the direct HTTP handlers. |
music_assistant/providers/yandex_smarthome/handlers.py |
Threads playlist_uris through device list/query/action handling. |
music_assistant/providers/yandex_smarthome/notifier.py |
Includes playlist-aware input_source capability/state reporting in callbacks. |
music_assistant/providers/yandex_smarthome/playlists.py |
New helper module for config options + starting playlist playback. |
music_assistant/providers/yandex_smarthome/plugin.py |
Parses/sanitizes playlist URI config and wires it into handlers/notifier. |
tests/providers/yandex_smarthome/test_device.py |
Adds coverage for combined modes and playlist/native action routing. |
tests/providers/yandex_smarthome/test_handlers.py |
Adds coverage that playlist URIs trigger mode(input_source) capability registration. |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps the
yandex_smarthomeplugin provider from v1.4.5 → v1.6.1. Two main additions: MA library playlists surfaced as Yandexmode(input_source)slots (v1.5.x), and an experimental Yandex Dialogs custom skill for free-form voice playback (v1.6.x).Source repo: trudenboy/ma-provider-yandex-smarthome · tag v1.6.1
Docs PR: music-assistant/music-assistant.io#623 — user-facing setup walkthrough for the playlist workaround.
What's new (v1.4.5 → v1.6.1)
Added — v1.6.0
dialogs_nlu.py(command parser + player resolver),dialogs_player.py(content resolver + play wrapper),dialogs.py(aiohttp webhook handler).track,artist,album,playlist,my_wave,genre,search. Extracts an optional"on <player>"location suffix and fuzzy-matches player names with Russian inflection stripping (e.g. the locative form "in the kitchen" correctly resolves to a player named "Kitchen").mass.music.searchby kind, with special-case paths for My Wave (yandex_music rotoruser:onyourwave) and genre radio (yandex_music genre rotor with artist-search fallback).body.session.skill_id, keeps a 200-entry in-memory LRU session cache so follow-up commands remember which player was chosen, powers the player on before playback if needed, and fires play viaself.mass.create_taskto stay within Yandex's 4.5 s response budget.auto_skill.pyis now parameterised byskill_type("smart_home"|"dialog"); the dialog path builds a separate draft payload and injects the generated webhook URL. Newauto_rename_dialog_skillhelper patches the skill name in Yandex Dialogs and re-deploys.Added — v1.5.0
mode(input_source)slots. A new "Exposed Playlists" config (multi-select from MA library, max 10) appears asmode(input_source)values on every exposed player. Native player sources keep priority and fill slots first; playlists fill the remainder. Trigger is ordinal only — Alice recognises the fixed catalogue valuesone..ten(e.g."Alice, switch <player> source to five"). Action on a playlist slot powers the player on if needed and starts playback viamass.player_queues.play_media.Fixed
list/dictgeneric types in_SearchResultsdataclass fields annotated aslist[object]/dict[str, object];resolve_playercalls withMockMassstub suppressed via# type: ignore[arg-type].mass.create_taskfor background play task (v1.6.0) — replaced bareasyncio.create_taskwithself._mass.create_taskso the playback task is tracked in the MA lifecycle and unhandled exceptions are logged by the framework's task handler.secrets.compare_digestfor constant-time safety.fetch_playlist_optionsnow pages throughiter_library_items.Changed files (vs v1.4.5)
yandex_smarthome/__init__.pyyandex_smarthome/auto_skill.pyyandex_smarthome/auto_skill_state.pyyandex_smarthome/auto_skill_ui.pyyandex_smarthome/constants.pyyandex_smarthome/device.pyyandex_smarthome/dialogs.pyyandex_smarthome/dialogs_nlu.pyyandex_smarthome/dialogs_player.pyyandex_smarthome/direct.pyyandex_smarthome/handlers.pyyandex_smarthome/notifier.pyyandex_smarthome/playlists.pyyandex_smarthome/plugin.pytests/.../test_auto_skill.pytests/.../test_device.pytests/.../test_dialogs.pytests/.../test_dialogs_nlu.pytests/.../test_dialogs_player.pytests/.../test_handlers.pyVerification
pytest tests/providers/yandex_smarthome/— 340+ passed on source repo🤖 Generated with Claude Code