From a54974412751c98dec78b5e3977afc4a97aadea9 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 18 Nov 2020 20:50:43 +0100 Subject: ma bureautomation: move to 20.09 style imports --- .../bureautomation/multi/daily-standup.nix | 83 +++++++++++----------- 1 file changed, 43 insertions(+), 40 deletions(-) (limited to 'makefu/2configs/bureautomation/multi/daily-standup.nix') diff --git a/makefu/2configs/bureautomation/multi/daily-standup.nix b/makefu/2configs/bureautomation/multi/daily-standup.nix index 38fb22c1..063def1e 100644 --- a/makefu/2configs/bureautomation/multi/daily-standup.nix +++ b/makefu/2configs/bureautomation/multi/daily-standup.nix @@ -1,4 +1,4 @@ -{ lib }: +{lib, ... }: let random_daily_text = ''{{ [ "Es ist so weit, es ist Standup Zeit!", @@ -9,46 +9,49 @@ let "Morgens, halb elf in Deutschland - das Standupchen" ] | random }}''; in { - script = - { "random_daily" = { - alias = "Random Daily Introduction"; + services.home-assistant.config = + { + script = + { "random_daily" = { + alias = "Random Daily Introduction"; - sequence = [ - { service = "media_player.play_media"; - data = { - entity_id = "media_player.mpd"; - media_content_type = "playlist"; - media_content_id = "ansage"; - }; - } - { delay.seconds = 5; } - { service = "tts.google_say"; - entity_id = "media_player.mpd"; - data_template = { - message = random_daily_text; - language = "de"; - }; - } - ]; - }; - }; - automation = [ - { - alias = "Daily Standup"; - trigger = { - platform = "time"; - at = "10:35:00"; + sequence = [ + { service = "media_player.play_media"; + data = { + entity_id = "media_player.mpd"; + media_content_type = "playlist"; + media_content_id = "ansage"; + }; + } + { delay.seconds = 5; } + { service = "tts.google_say"; + entity_id = "media_player.mpd"; + data_template = { + message = random_daily_text; + language = "de"; + }; + } + ]; }; - action = - [ - { service = "homeassistant.turn_on"; - entity_id = [ - "script.blitz_10s" - "script.random_daily" - ]; - } - ]; + }; + automation = [ + { + alias = "Daily Standup"; + trigger = { + platform = "time"; + at = "10:35:00"; + }; + action = + [ + { service = "homeassistant.turn_on"; + entity_id = [ + "script.blitz_10s" + "script.random_daily" + ]; + } + ]; - } - ]; + } + ]; + }; } -- cgit v1.2.3