Skip to content

Commit 9d85d1a

Browse files
c0ffeeca7OzGav
andauthored
Add actions to Music Assistant (home-assistant#36469) (home-assistant#36784)
Co-authored-by: OzGav <gavnosp@hotmail.com>
1 parent 3d00e98 commit 9d85d1a

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

source/_integrations/music_assistant.markdown

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,89 @@ Transfer the player's queue to another player.
135135
- **Description**: Start playing the queue on the target player. Omit to use the default behavior.
136136
- **Example**: `true`
137137

138+
### Action `music_assistant.search`
139+
140+
Perform a global search on the Music Assistant library and all providers.
141+
142+
- **Data attribute**: `config_entry_id`
143+
- **Optional**: No.
144+
- **Description**: The Music Assistant instance that the search will be performed upon. Allows for multiple servers to be running.
145+
- **Example**: `Music Assistant`
146+
- **Data attribute**: `name`
147+
- **Optional**: No.
148+
- **Description**: The name/title to search for.
149+
- **Example**: `We Are The Champions`
150+
- **Data attribute**: `media_type`
151+
- **Optional**: Yes.
152+
- **Description**: The type(s) of content to search for. Select from artist, album, track, radio, or playlist. All types if omitted.
153+
- **Example**: `playlist`
154+
- **Data attribute**: `artist`
155+
- **Optional**: Yes.
156+
- **Description**: When specifying a track or album in the name field, you can optionally restrict results by this artist name.
157+
- **Example**: `Queen`
158+
- **Data attribute**: `album`
159+
- **Optional**: Yes.
160+
- **Description**: When specifying a track in the name field, you can optionally restrict results by this album name.
161+
- **Example**: `News of the world`
162+
- **Data attribute**: `limit`
163+
- **Optional**: Yes.
164+
- **Description**: Maximum number of items to return (per media type).
165+
- **Example**: `10`
166+
- **Data attribute**: `library_only`
167+
- **Optional**: Yes.
168+
- **Description**: Only include results that are in the library.
169+
- **Example**: `true`
170+
171+
### Action `music_assistant.get_library`
172+
173+
Perform a local search on the Music Assistant library.
174+
175+
- **Data attribute**: `config_entry_id`
176+
- **Optional**: No.
177+
- **Description**: The Music Assistant instance that the search will be performed upon. Allows for multiple servers to be running.
178+
- **Example**: `Music Assistant`
179+
- **Data attribute**: `media_type`
180+
- **Optional**: No.
181+
- **Description**: The type of content to search for. Select from artist, album, track, radio, or playlist.
182+
- **Example**: `artist`
183+
- **Data attribute**: `favorite`
184+
- **Optional**: Yes.
185+
- **Description**: When selected, only items marked as favorites will be returned.
186+
- **Example**: `false`
187+
- **Data attribute**: `limit`
188+
- **Optional**: Yes.
189+
- **Description**: Maximum number of items to return.
190+
- **Example**: `25`
191+
- **Data attribute**: `offset`
192+
- **Optional**: Yes.
193+
- **Description**: From what point in the list should results be returned.
194+
- **Example**: `10`
195+
- **Data attribute**: `search`
196+
- **Optional**: Yes.
197+
- **Description**: A string that will further filter the results.
198+
- **Example**: `Home`
199+
- **Data attribute**: `order_by`
200+
- **Optional**: Yes.
201+
- **Description**: Sort the list by this field. View available sorting options in the Developer Tools > Actions > music_assistant.get_library action.
202+
- **Example**: `year`
203+
- **Data attribute**: `album_artists_only`
204+
- **Optional**: Yes.
205+
- **Description**: When `artist` is the `media_type` then this option will restrict the result to album artists only.
206+
- **Example**: `true`
207+
- **Data attribute**: `album_type`
208+
- **Optional**: Yes.
209+
- **Description**: When `album` is the `media_type` then this option will restrict the result according to the selection of either album, single, compilation, EP or unknown.
210+
- **Example**: `album`
211+
212+
### Action `music_assistant.get_queue`
213+
214+
Get the queue details of a Music Assistant player queue.
215+
216+
- **Data attribute**: `entity_id`
217+
- **Optional**: No.
218+
- **Description**: The entity_id of the player holding the queue to be retrieved.
219+
- **Example**: `media_player.kitchen_speaker`
220+
138221
## Notes
139222

140223
- Any Home Assistant players added to Music Assistant will appear duplicated as the MA version of the player is created. The original HA player can be hidden if desired.

0 commit comments

Comments
 (0)