nixos-configs/devices/homie/modules/home-assistant/spotify-sentences.nix
matt1432 a4d2b936d9
All checks were successful
Discord / discord commits (push) Has been skipped
feat(hass): add PlayPlaylist voice command
2024-10-09 00:34:58 -04:00

60 lines
1.2 KiB
Nix

{
language = "en";
intents = {
PlayAlbum.data = [
{
sentences = [
"play[ing] [the] album {album} from [the] [artist] {artist}"
];
}
{
sentences = [
"play[ing] [the] album {album}"
];
slots.artist = "";
}
];
PlayArtist.data = [
{
sentences = [
"play[ing] [some] music from [the] [artist] {artist}"
"play[ing] [the] artist {artist}"
];
}
];
PlayPlaylist.data = [
{
sentences = [
"play[ing] [the] playlist {playlist}"
];
}
];
};
lists = {
album.wildcard = true;
artist.wildcard = true;
playlist.wildcard = true;
};
responses.intents = {
PlayAlbum.default = ''
Searching for the album {{ slots.album }}
{% if slots.artist != "" %}
by {{ slots.artist }}
{% endif %}
on Spotify and playing it.
'';
PlayArtist.default = ''
Searching for the artist {{ slots.artist }} on Spotify and playing their top songs.
'';
PlayPlaylist.default = ''
Searching for {{ slots.playlist }} in your favorites, or elsewhere if not found, and playing it.
'';
};
}