-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Something went wrong: Action script.play_music not found #50
Comments
Hi, I think a lot of things have changed since the normal function.
|
Hello, @debdalerichard I've been trying to get this working but all It says back is "Something went wrong: failed to load functions. Verify functions are valid in a yaml format" I've formatted it correctly too I believe so I'm not sure what I've done wrong. - spec:
name: search_music
description: Searches for music.
parameters:
type: object
properties:
query:
type: string
description: The search query for music (e.g., artist, album, track).
media_type:
type: array
optional: true
items:
type: string
enum: ["artist", "album", "playlist", "track", "radio"]
description: Types of media to search. Default is all media types.
artist:
type: string
optional: true
description: Specify an artist for a more focused search.
album:
type: string
optional: true
description: Specify an album for a more focused search.
required:
- query
function:
type: script
sequence:
- service: mass.search
data:
name: '{{ query }}'
media_type: >
{% if media_type is defined and media_type %}
{{ media_type | tojson }}
{% else %}
["artist", "album", "playlist", "track", "radio"]
{% endif %}
{% if artist is defined and artist %}
artist: '{{ artist }}'
{% endif %}
{% if album is defined and album %}
album: '{{ album }}'
{% endif %}
limit: 1
- spec:
name: music_assistant_play
description: >
Plays a Spotify URI after searching for it
using search_music. If a device is not defined,
use media_player.roomsatellite.
parameters:
type: object
properties:
media_player_id:
type: array
items:
type: string
description: List of media player Entity IDs to play.
media_id:
type: string
description: Media identifier (URI)
enqueue:
type: string
enum: ["play", "replace", "next", "replace_next", "add"]
description: >
How to enqueue the media.
If the user says to play a song next, then use next.
If the user says to play a song at the end of the playlist, then use add.
If the user says to start a new playlist, then use replace.
If you are unsure, just use play.
required:
- media_player_id
- media_id
- enqueue
function:
type: script
sequence:
- service: mass.play_media
target:
entity_id: "{{ media_player_id }}"
data:
media_id: "{{ media_id }}"
enqueue: "{{ enqueue }}" |
Hi,
when I'm trying to play music I get this error message.
I'm using the promt, the specs and the play_music script from this repo. I allready double checked the entity ID from the sript and exposed the script to assist. Still the same result.
What am I doing wrong?
The text was updated successfully, but these errors were encountered: