From 158f65a97eaac7020d3020320687aaf84ae4f6de Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 4 Jul 2019 11:23:41 +0200 Subject: ma bureautomation: remove buzzing --- .../bureautomation/combination/10h_timers.nix | 31 ---------------------- 1 file changed, 31 deletions(-) (limited to 'makefu') diff --git a/makefu/2configs/bureautomation/combination/10h_timers.nix b/makefu/2configs/bureautomation/combination/10h_timers.nix index 4bbae0dd..79a608cd 100644 --- a/makefu/2configs/bureautomation/combination/10h_timers.nix +++ b/makefu/2configs/bureautomation/combination/10h_timers.nix @@ -57,42 +57,12 @@ let "Wer wohnt in der Ananas ganz tief im Meer? ${name} Schwammkopf!", "Arbeit ist Freizeit! Wachstum ist Fortschritt! Sicherheit ist Freiheit!", "Willkommen ${name}"] | random }}'' ; - patterns = [ - [1000 500 250] # TODO: maybe even play a short audio announcement? - [150 150 150] - [255 255] - [500 500 100] - [100 1000 100] - # [125 250 500] - ]; tmr_10h = name: { "${name}_10h" = { name = "${name} 10h Timer"; duration = "10:00:00"; }; }; - multi_flash = { entity, delays ? [ 500 ], alias ? "${entity}_multi_flash_${toString (lib.length delays)}" }: - { - inherit alias; - sequence = lib.flatten (builtins.map (delay: [ - { service = "homeassistant.turn_on"; - data.entity_id = entity; - } - { delay.milliseconds = delay; } - { service = "homeassistant.turn_off"; - data.entity_id = entity; - } - { delay.milliseconds = delay; } - ] - ) delays); - }; - - buzz_user = name: delays: { "buzz_${name}" = (multi_flash { - entity = "light.redbutton_buzzer"; - inherit delays; - alias = "Red Button Buzz ${name}"; - }); - }; zu_lange_user = name: { "zu_lange_${name}" = { @@ -210,7 +180,6 @@ in (map tmr_10h persons); automation = (lib.flatten (map automation_10h persons)); script = lib.fold lib.recursiveUpdate {} ( - (map (ab: buzz_user ab.fst ab.snd) (lib.zipLists persons patterns)) ++ (map (p: announce_user p) persons) ++ (map (p: zu_lange_user p) persons) ); -- cgit v1.2.3