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
|
2024-11-20 15:17:55 -05:00
|
|
|
(self.scopedPackages.${pkgs.system}.hass-components)
|
2024-10-05 02:57:07 -04:00
|
|
|
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 = {
|
2024-12-02 11:03:43 -05:00
|
|
|
async_action = false;
|
2024-10-09 00:34:58 -04:00
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_play_album";
|
|
|
|
data = {
|
|
|
|
artist = "{{ artist }}";
|
|
|
|
album = "{{ album }}";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-10-07 15:15:29 -04:00
|
|
|
PlayArtist = {
|
2024-12-02 11:03:43 -05:00
|
|
|
async_action = false;
|
2024-10-07 15:15:29 -04:00
|
|
|
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-12-02 11:03:43 -05:00
|
|
|
async_action = false;
|
2024-10-08 02:07:05 -04:00
|
|
|
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 = {
|
2024-12-02 11:03:43 -05:00
|
|
|
async_action = false;
|
2024-10-09 11:01:53 -04:00
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_play_song";
|
|
|
|
data = {
|
|
|
|
artist = "{{ artist }}";
|
|
|
|
song = "{{ song }}";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-12-02 11:03:43 -05:00
|
|
|
|
|
|
|
Pause = {
|
|
|
|
async_action = false;
|
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_pause_unpause";
|
|
|
|
data.pause = true;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Unpause = {
|
|
|
|
async_action = false;
|
|
|
|
action = [
|
|
|
|
{
|
|
|
|
service = "netdaemon.spotify_pause_unpause";
|
|
|
|
data.pause = false;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2024-10-07 15:15:29 -04:00
|
|
|
};
|
2024-10-05 02:57:07 -04:00
|
|
|
};
|
|
|
|
}
|