summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bureautomation/multi
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2019-11-05 23:01:37 +0100
committerJeschli <jeschli@gmail.com>2019-11-14 15:36:11 +0100
commit296d0ebdb16460e19c370185b83adc6985c1cad5 (patch)
tree2f46b60e8ba59e2a7ff124982c57a270cc0cded4 /makefu/2configs/bureautomation/multi
parent4563c446f1ea13af69bdc03614b66bdf09c66154 (diff)
ma bureautomation: add frosch,daily-standup
Diffstat (limited to 'makefu/2configs/bureautomation/multi')
-rw-r--r--makefu/2configs/bureautomation/multi/10h_timers.nix4
-rw-r--r--makefu/2configs/bureautomation/multi/daily-standup.nix54
-rw-r--r--makefu/2configs/bureautomation/multi/frosch.nix2
3 files changed, 57 insertions, 3 deletions
diff --git a/makefu/2configs/bureautomation/multi/10h_timers.nix b/makefu/2configs/bureautomation/multi/10h_timers.nix
index 8cdaa8cfd..73709e738 100644
--- a/makefu/2configs/bureautomation/multi/10h_timers.nix
+++ b/makefu/2configs/bureautomation/multi/10h_timers.nix
@@ -122,7 +122,7 @@ let
trigger = {
platform = "state";
# TODO: ecki
- entity_id = [ "device_tracker.${name}_phone"];
+ entity_id = [ "person.${name}"];
from = "not_home";
to = "home";
};
@@ -166,7 +166,7 @@ let
condition =
{
condition = "state";
- entity_id = "device_tracker.${name}_phone";
+ entity_id = "person.${name}";
state = "home";
};
diff --git a/makefu/2configs/bureautomation/multi/daily-standup.nix b/makefu/2configs/bureautomation/multi/daily-standup.nix
new file mode 100644
index 000000000..f5bd85b9d
--- /dev/null
+++ b/makefu/2configs/bureautomation/multi/daily-standup.nix
@@ -0,0 +1,54 @@
+{ 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!",
+ "Hat jeder seine Hausaufgaben gemacht? Bitte einmal aufstehen und den Zettel nach rechts geben",
+ "Aufstehen zum Appell, es wird die Anwesenheit kontrolliert!",
+ "Hallo Kinder, wisst ihr welche Zeit es ist??? ... Genau! ... Standup Zeit!",
+ "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"
+ ];
+ }
+ ];
+
+ }
+ ];
+}
diff --git a/makefu/2configs/bureautomation/multi/frosch.nix b/makefu/2configs/bureautomation/multi/frosch.nix
index de93ce2b7..c0e267b69 100644
--- a/makefu/2configs/bureautomation/multi/frosch.nix
+++ b/makefu/2configs/bureautomation/multi/frosch.nix
@@ -1,6 +1,6 @@
{ lib }:
+# needs: binary_sensor.pommes
let
-
random_pommes = '' {{ [
"Nur ein Pommes Tag ist ein guter Tag",
"Schaut wie schön sie fliegen, die Pommes Seifenblasen",