summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/lib/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/2configs/shack/glados/lib/default.nix')
-rw-r--r--krebs/2configs/shack/glados/lib/default.nix66
1 files changed, 0 insertions, 66 deletions
diff --git a/krebs/2configs/shack/glados/lib/default.nix b/krebs/2configs/shack/glados/lib/default.nix
deleted file mode 100644
index 2cfac3daf..000000000
--- a/krebs/2configs/shack/glados/lib/default.nix
+++ /dev/null
@@ -1,66 +0,0 @@
-let
- prefix = "glados";
-in
-{
-
- say = let
- # returns a list of actions to be performed on an mpd to say something
- tts = { message, entity }:
- [
- {
- service = "media_player.turn_on";
- data.entity_id = "media_player.${entity}";
- }
- { service = "media_player.play_media";
- data = {
- entity_id = "media_player.${entity}";
- media_content_type = "playlist";
- media_content_id = "ansage";
- };
- }
- {
- service = "media_player.turn_on";
- data.entity_id = "media_player.${entity}";
- }
- { delay.seconds = 4.5; }
- { service = "tts.say";
- entity_id = "media_player.${entity}";
- data_template = {
- inherit message;
- language = "de";
- };
- }
- ];
- in
- {
- lounge = message: tts {
- inherit message;
- entity = "lounge";
- };
- herrenklo = message: tts {
- inherit message;
- entity = "herrenklo";
- };
- kiosk = message: tts {
- inherit message;
- entity = "kiosk";
- };
- };
- tasmota =
- {
- plug = {host, name ? host, topic ? host}:
- {
- platform = "mqtt";
- inherit name;
- state_topic = "sonoff/stat/${topic}/POWER1";
- command_topic = "sonoff/cmnd/${topic}/POWER1";
- availability_topic = "sonoff/tele/${topic}/LWT";
- payload_on= "ON";
- payload_off= "OFF";
- payload_available= "Online";
- payload_not_available= "Offline";
- retain = false;
- qos = 1;
- };
- };
-}