From ce4f9c23ec796ad747580b422e6c2bb22cd28a56 Mon Sep 17 00:00:00 2001 From: matt1432 Date: Mon, 2 Dec 2024 11:03:43 -0500 Subject: [PATCH] feat(netd): add pause/unpause script --- .../netdaemon/HomeAssistantGenerated | Bin 695109 -> 782687 bytes .../apps/Spotify/PauseUnpause/PauseUnpause.cs | 48 ++++++++++++++++++ .../home-assistant/netdaemon/default.nix | 2 +- .../home-assistant/spotify-sentences.nix | 25 +++++++++ .../homie/modules/home-assistant/spotify.nix | 28 ++++++++-- 5 files changed, 98 insertions(+), 5 deletions(-) create mode 100644 devices/homie/modules/home-assistant/netdaemon/apps/Spotify/PauseUnpause/PauseUnpause.cs diff --git a/devices/homie/modules/home-assistant/netdaemon/HomeAssistantGenerated b/devices/homie/modules/home-assistant/netdaemon/HomeAssistantGenerated index a7ed1b7936a44f60b996e8493b8b78cf9082b78b..2a5adaaa8455d7a0c7dfd8105a76b7cb2704890b 100644 GIT binary patch delta 30532 zcmeHv3wT^rx#+iNzbEfD@8?dMq)D4+pY+|dDYo>Hq;C*NCYjx4=wxO(Gie$?nu;Ej z12ko9e~}}!DhMc&8g)2cq3Kb)2M}nvK2Q)+K~X@OdX>vTDfeG%?Y$>6NlF@1K!uO* z>tye>{>NJXd#(LH_PrS|{ieG2yP2~pYi4b(tywsG!NS@FRdZ_R&7NH|x3XsLv8T4j zC)Nc5u0U{;BdELGu3%^={u;&O^m|>-;GPhdG$$$gy-uF>U!HJG7CO8^_Lq_dVhM%P z95BG>McR_3nn&-_qNayx^DFxA%Dyvhrd`ATqTU7dRi23SzPJ( z#zRUKm)^gx;@^c(%a();#*DUkt5&;UR#ol1OR8$BYHQ|&PJA*wbnEOXp}nnTq2sd? z`nT84;X+^98lSk%wa4YzsrkL$4xD9;OPHM!dZRUsj14_ED>wA`#<7O>C(Q24hKvd> zHHos+t*vzU^*OEcT0>{+(?YjyNK)JIK{I{gxFM(iX0fwm}cp)4?n0*g71#iH&T;fpv6TT+_S@ zfV#S=JbiQ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Ep9e2A*B5sZVN*Kty~cg^~)GF9B4!#a3_m< zMArVuO|Agn0#*n0S^NNLkK;2YKu{U0CUesH=@=R|uwmqE0k51rep3?aQ8WyG#9K+z zK7OecrVsD|BCSR`BGOvaP(xNV2{!lhYKZs?>&StAzHHdPMlTy4V=Y|H;%wwmKQ9~2 zs3( + "spotify_pause_unpause", + (e) => + { + try + { + if (e.pause) + { + services.Spotifyplus.PlayerMediaPause( + entityId: SpotifyTypes.DefaultEntityId, + deviceId: SpotifyTypes.DefaultDevId); + } + else + { + services.Spotifyplus.PlayerMediaResume( + entityId: SpotifyTypes.DefaultEntityId, + deviceId: SpotifyTypes.DefaultDevId); + } + } + catch (Exception error) + { + services.Notify.PersistentNotification( + message: error.Message, + title: "Erreur Spotify"); + } + } + ); + } + } +} diff --git a/devices/homie/modules/home-assistant/netdaemon/default.nix b/devices/homie/modules/home-assistant/netdaemon/default.nix index b873a5e1..ca407fdf 100644 --- a/devices/homie/modules/home-assistant/netdaemon/default.nix +++ b/devices/homie/modules/home-assistant/netdaemon/default.nix @@ -92,7 +92,7 @@ in { EOF )") . - alejandra . + alejandra -q . rm -r "$FLAKE/.config" sed -i "s/finalImageTag = .*/finalImageTag = \"$(cat ./.version)\";/" ./images/netdaemon.nix diff --git a/devices/homie/modules/home-assistant/spotify-sentences.nix b/devices/homie/modules/home-assistant/spotify-sentences.nix index cd7d1c14..d782dfbf 100644 --- a/devices/homie/modules/home-assistant/spotify-sentences.nix +++ b/devices/homie/modules/home-assistant/spotify-sentences.nix @@ -46,6 +46,23 @@ slots.artist = ""; } ]; + + Pause.data = [ + { + sentences = [ + "(pause|stop) [the] [(song|track|music)]" + "(pause|stop) spotify" + ]; + } + ]; + Unpause.data = [ + { + sentences = [ + "(unpause|resume) [the] [(song|track|music)]" + "(unpause|resume) spotify" + ]; + } + ]; }; lists = { @@ -79,5 +96,13 @@ {% endif %} on Spotify and playing it. ''; + + Pause.default = '' + Pausing the music. + ''; + + Unpause.default = '' + Resuming the music. + ''; }; } diff --git a/devices/homie/modules/home-assistant/spotify.nix b/devices/homie/modules/home-assistant/spotify.nix index e3255557..75b929d9 100644 --- a/devices/homie/modules/home-assistant/spotify.nix +++ b/devices/homie/modules/home-assistant/spotify.nix @@ -24,7 +24,7 @@ config.intent_script = { PlayAlbum = { - async_action = "false"; + async_action = false; action = [ { service = "netdaemon.spotify_play_album"; @@ -37,7 +37,7 @@ }; PlayArtist = { - async_action = "false"; + async_action = false; action = [ { service = "netdaemon.spotify_play_artist"; @@ -47,7 +47,7 @@ }; PlayPlaylist = { - async_action = "false"; + async_action = false; action = [ { service = "netdaemon.spotify_play_playlist"; @@ -57,7 +57,7 @@ }; PlaySong = { - async_action = "false"; + async_action = false; action = [ { service = "netdaemon.spotify_play_song"; @@ -68,6 +68,26 @@ } ]; }; + + 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; + } + ]; + }; }; }; }