ma bureautomation: add frosch,daily-standup
This commit is contained in:
parent
5177a09758
commit
deb3555be7
|
@ -4,7 +4,9 @@ let
|
||||||
ten_hours = import ./multi/10h_timers.nix { inherit lib; }; # provides: timer automation script
|
ten_hours = import ./multi/10h_timers.nix { inherit lib; }; # provides: timer automation script
|
||||||
mittagessen = import ./multi/mittagessen.nix { inherit lib; }; # provides: automation script
|
mittagessen = import ./multi/mittagessen.nix { inherit lib; }; # provides: automation script
|
||||||
matrix = import ./multi/matrix.nix { inherit lib; }; # provides: matrix automation
|
matrix = import ./multi/matrix.nix { inherit lib; }; # provides: matrix automation
|
||||||
aramark = import ./multi/aramark.nix { inherit lib; }; # provides: pommes sensor
|
frosch = import ./multi/frosch.nix { inherit lib; }; # provides: sensor binary_sensor switch light script automation
|
||||||
|
aramark = import ./multi/aramark.nix { inherit lib; }; # provides: sensor binary_sensor
|
||||||
|
standup = import ./multi/daily-standup.nix { inherit lib; }; # provides: automation script
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./ota.nix
|
./ota.nix
|
||||||
|
@ -88,10 +90,12 @@ in {
|
||||||
retain = true;
|
retain = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
switch = (import ./switch/tasmota_switch.nix) ++
|
switch = (import ./switch/tasmota_switch.nix)
|
||||||
(import ./switch/rfbridge.nix);
|
++ frosch.switch
|
||||||
light = (import ./light/statuslight.nix) ++
|
++ (import ./switch/rfbridge.nix);
|
||||||
(import ./light/buzzer.nix);
|
light = (import ./light/statuslight.nix)
|
||||||
|
++ (import ./light/buzzer.nix)
|
||||||
|
++ frosch.light;
|
||||||
timer = ten_hours.timer;
|
timer = ten_hours.timer;
|
||||||
notify = [
|
notify = [
|
||||||
{
|
{
|
||||||
|
@ -117,31 +121,34 @@ in {
|
||||||
];
|
];
|
||||||
script = lib.fold lib.recursiveUpdate {} [
|
script = lib.fold lib.recursiveUpdate {} [
|
||||||
((import ./script/multi_blink.nix) {inherit lib;})
|
((import ./script/multi_blink.nix) {inherit lib;})
|
||||||
|
frosch.script
|
||||||
ten_hours.script
|
ten_hours.script
|
||||||
mittagessen.script
|
mittagessen.script
|
||||||
|
standup.script
|
||||||
];
|
];
|
||||||
binary_sensor =
|
binary_sensor =
|
||||||
(import ./binary_sensor/buttons.nix) ++
|
(import ./binary_sensor/buttons.nix)
|
||||||
(import ./binary_sensor/motion.nix) ++
|
++ (import ./binary_sensor/motion.nix)
|
||||||
aramark.binary_sensor;
|
++ frosch.binary_sensor
|
||||||
|
++ aramark.binary_sensor;
|
||||||
|
|
||||||
sensor =
|
sensor =
|
||||||
# [{ platform = "version"; }] ++ # pyhaversion
|
# [{ platform = "version"; }] ++ # pyhaversion
|
||||||
(import ./sensor/pollen.nix) ++
|
(import ./sensor/pollen.nix)
|
||||||
(import ./sensor/espeasy.nix) ++
|
++ (import ./sensor/espeasy.nix)
|
||||||
(import ./sensor/airquality.nix) ++
|
++ (import ./sensor/airquality.nix)
|
||||||
((import ./sensor/outside.nix) {inherit lib;}) ++
|
++ ((import ./sensor/outside.nix) {inherit lib;})
|
||||||
(import ./sensor/influxdb.nix) ++
|
++ (import ./sensor/influxdb.nix)
|
||||||
(import ./sensor/tasmota_firmware.nix) ++
|
++ (import ./sensor/tasmota_firmware.nix)
|
||||||
aramark.sensor;
|
++ frosch.sensor
|
||||||
|
++ aramark.sensor;
|
||||||
|
|
||||||
camera =
|
camera =
|
||||||
(import ./camera/verkehrskamera.nix)
|
(import ./camera/verkehrskamera.nix)
|
||||||
++ (import ./camera/comic.nix);
|
++ (import ./camera/comic.nix);
|
||||||
|
|
||||||
# not yet released
|
person =
|
||||||
#person =
|
(import ./person/team.nix );
|
||||||
# (import ./person/team.nix );
|
|
||||||
|
|
||||||
frontend = { };
|
frontend = { };
|
||||||
http = {
|
http = {
|
||||||
|
@ -196,13 +203,22 @@ in {
|
||||||
"light.buslicht"
|
"light.buslicht"
|
||||||
];
|
];
|
||||||
team = [
|
team = [
|
||||||
"device_tracker.thorsten_phone"
|
"person.thorsten"
|
||||||
"device_tracker.felix_phone"
|
#"device_tracker.thorsten_phone"
|
||||||
"device_tracker.ecki_tablet"
|
"person.felix"
|
||||||
"device_tracker.daniel_phone"
|
"person.ecki"
|
||||||
"device_tracker.carsten_phone"
|
"person.daniel"
|
||||||
"device_tracker.thierry_phone"
|
# "person.carsten"
|
||||||
"device_tracker.frank_phone"
|
"person.thierry"
|
||||||
|
"person.frank"
|
||||||
|
"person.emeka"
|
||||||
|
#"device_tracker.felix_phone"
|
||||||
|
#"device_tracker.ecki_tablet"
|
||||||
|
#"device_tracker.daniel_phone"
|
||||||
|
#"device_tracker.carsten_phone"
|
||||||
|
#"device_tracker.thierry_phone"
|
||||||
|
#"device_tracker.frank_phone"
|
||||||
|
#"device_tracker.emeka_phone"
|
||||||
# "person.thorsten"
|
# "person.thorsten"
|
||||||
# "person.felix"
|
# "person.felix"
|
||||||
# "person.ecki"
|
# "person.ecki"
|
||||||
|
@ -237,8 +253,6 @@ in {
|
||||||
];
|
];
|
||||||
sensors = [
|
sensors = [
|
||||||
"media_player.kodi"
|
"media_player.kodi"
|
||||||
"script.blitz_10s"
|
|
||||||
"script.buzz_red_led_fast"
|
|
||||||
"timer.felix_10h"
|
"timer.felix_10h"
|
||||||
"timer.frank_10h"
|
"timer.frank_10h"
|
||||||
"sensor.easy2_dht22_humidity"
|
"sensor.easy2_dht22_humidity"
|
||||||
|
@ -262,13 +276,15 @@ in {
|
||||||
# feedreader.urls = [ "http://www.heise.de/security/rss/news-atom.xml" ];
|
# feedreader.urls = [ "http://www.heise.de/security/rss/news-atom.xml" ];
|
||||||
# we don't use imports because the expressions do not merge in
|
# we don't use imports because the expressions do not merge in
|
||||||
# home-assistant
|
# home-assistant
|
||||||
automation = (import ./automation/bureau-shutdown.nix) ++
|
automation = (import ./automation/bureau-shutdown.nix)
|
||||||
(import ./automation/nachtlicht.nix) ++
|
++ (import ./automation/nachtlicht.nix)
|
||||||
(import ./automation/schlechteluft.nix) ++
|
++ (import ./automation/schlechteluft.nix)
|
||||||
(import ./automation/hass-restart.nix) ++
|
++ (import ./automation/hass-restart.nix)
|
||||||
ten_hours.automation ++
|
++ ten_hours.automation
|
||||||
matrix.automation ++
|
++ matrix.automation
|
||||||
mittagessen.automation;
|
++ standup.automation
|
||||||
|
++ frosch.automation
|
||||||
|
++ mittagessen.automation;
|
||||||
device_tracker = (import ./device_tracker/openwrt.nix );
|
device_tracker = (import ./device_tracker/openwrt.nix );
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -122,7 +122,7 @@ let
|
||||||
trigger = {
|
trigger = {
|
||||||
platform = "state";
|
platform = "state";
|
||||||
# TODO: ecki
|
# TODO: ecki
|
||||||
entity_id = [ "device_tracker.${name}_phone"];
|
entity_id = [ "person.${name}"];
|
||||||
from = "not_home";
|
from = "not_home";
|
||||||
to = "home";
|
to = "home";
|
||||||
};
|
};
|
||||||
|
@ -166,7 +166,7 @@ let
|
||||||
condition =
|
condition =
|
||||||
{
|
{
|
||||||
condition = "state";
|
condition = "state";
|
||||||
entity_id = "device_tracker.${name}_phone";
|
entity_id = "person.${name}";
|
||||||
state = "home";
|
state = "home";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
54
2configs/bureautomation/multi/daily-standup.nix
Normal file
54
2configs/bureautomation/multi/daily-standup.nix
Normal file
|
@ -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"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib }:
|
{ lib }:
|
||||||
|
# needs: binary_sensor.pommes
|
||||||
let
|
let
|
||||||
|
|
||||||
random_pommes = '' {{ [
|
random_pommes = '' {{ [
|
||||||
"Nur ein Pommes Tag ist ein guter Tag",
|
"Nur ein Pommes Tag ist ein guter Tag",
|
||||||
"Schaut wie schön sie fliegen, die Pommes Seifenblasen",
|
"Schaut wie schön sie fliegen, die Pommes Seifenblasen",
|
||||||
|
|
Loading…
Reference in a new issue