2019-11-05 22:01:37 +00:00
|
|
|
{ lib }:
|
|
|
|
let
|
|
|
|
random_daily_text = ''{{ [
|
|
|
|
"Es ist so weit, es ist Standup Zeit!",
|
|
|
|
"Zehn Uhr Fünfunddreissig ist genau die richtige Zeit für ein Standup!",
|
2020-03-13 09:41:01 +00:00
|
|
|
"Hat jeder seine zum Standup seine Hausaufgaben gemacht. Bitte einmal aufstehen und den Zettel nach rechts geben",
|
2019-11-05 22:01:37 +00:00
|
|
|
"Aufstehen zum Appell, es wird die Anwesenheit kontrolliert!",
|
2020-03-13 09:41:01 +00:00
|
|
|
"Hallo Kinder, wisst ihr welche Zeit es ist ... Genau ... Standup Zeit!",
|
2019-11-05 22:01:37 +00:00
|
|
|
"Morgens, halb elf in Deutschland - das Standupchen" ] | random }}'';
|
|
|
|
|
|
|
|
in {
|
|
|
|
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";
|
|
|
|
};
|
|
|
|
action =
|
|
|
|
[
|
|
|
|
{ service = "homeassistant.turn_on";
|
|
|
|
entity_id = [
|
|
|
|
"script.blitz_10s"
|
|
|
|
"script.random_daily"
|
|
|
|
];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|