2024-10-05 02:57:07 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
self,
|
|
|
|
...
|
2024-10-09 23:14:05 -04:00
|
|
|
}: {
|
2024-10-05 02:57:07 -04:00
|
|
|
services.home-assistant = {
|
|
|
|
customComponents = builtins.attrValues {
|
|
|
|
inherit
|
|
|
|
(self.legacyPackages.${pkgs.system}.hass-components)
|
|
|
|
spotifyplus
|
|
|
|
;
|
|
|
|
};
|
|
|
|
|
|
|
|
extraComponents = [
|
|
|
|
"spotify"
|
|
|
|
];
|
2024-10-07 15:15:29 -04:00
|
|
|
|
2024-10-09 23:14:05 -04:00
|
|
|
customSentences."assist_spotify" = import ./spotify-sentences.nix;
|
|
|
|
|
|
|
|
configFiles.
|
|
|
|
".storage/SpotifyWebApiPython_librespot_credentials.json"
|
|
|
|
.source = config.sops.secrets.spotifyd.path;
|
|
|
|
|
2024-10-07 15:15:29 -04:00
|
|
|
config.intent_script = {
|
2024-10-09 00:34:58 -04:00
|
|
|
PlayAlbum = {
|
|
|
|
async_action = "false";
|
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_play_album";
|
|
|
|
data = {
|
|
|
|
artist = "{{ artist }}";
|
|
|
|
album = "{{ album }}";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-10-07 15:15:29 -04:00
|
|
|
PlayArtist = {
|
|
|
|
async_action = "false";
|
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_play_artist";
|
2024-10-08 02:07:05 -04:00
|
|
|
data.artist = "{{ artist }}";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-10-09 00:34:58 -04:00
|
|
|
PlayPlaylist = {
|
2024-10-08 02:07:05 -04:00
|
|
|
async_action = "false";
|
|
|
|
action = [
|
|
|
|
{
|
2024-10-09 00:34:58 -04:00
|
|
|
service = "netdaemon.spotify_play_playlist";
|
|
|
|
data.playlist = "{{ playlist }}";
|
2024-10-07 15:15:29 -04:00
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-10-09 11:01:53 -04:00
|
|
|
|
|
|
|
PlaySong = {
|
|
|
|
async_action = "false";
|
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_play_song";
|
|
|
|
data = {
|
|
|
|
artist = "{{ artist }}";
|
|
|
|
song = "{{ song }}";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-10-07 15:15:29 -04:00
|
|
|
};
|
2024-10-05 02:57:07 -04:00
|
|
|
};
|
|
|
|
}
|