Help building spotcast function
Xornop opened this issue · comments
Xornop commented
when i add any
- spec
Line to the functions field, the LLM is not responding and just says the error
Something went wrong: failed to load functions. Verify functions are valid in a yaml format
I am adding a function from your examples and that even gives the error, making me think its not my own code.
Min Jekal commented
Thanks for reporting an issue.
Could you share a full yaml of functions?
Xornop commented
Closed this issue. I found my indentation error.
sajov commented
@Xornop i also try to integrate a function for spotcast, Can you share details of yours?
Xornop commented
- spec:
name: play_spotify
description: Play Spotify on a device
function:
type: script
sequence:
- choose:
- conditions:
- condition: state
entity_id: media_player.spotify_user1
state: paused
sequence:
- service: spotcast.start
data:
force_playback: true
random_song: true
repeat: context
shuffle: true
offset: 0
ignore_fully_played: false
account: user1
device_name: Chromecast
- conditions:
- condition: state
entity_id: media_player.spotify_user1
state: playing
sequence:
- service: media_player.media_pause
target:
entity_id: media_player.spotify_user1
data: {}