summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/bureautomation/script
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
committermakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
commit060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch)
tree2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/bureautomation/script
parentcbfcc890e3b76d942b927809bf981a5fa7289e6a (diff)
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/bureautomation/script')
-rw-r--r--makefu/2configs/bureautomation/script/multi_blink.nix60
1 files changed, 0 insertions, 60 deletions
diff --git a/makefu/2configs/bureautomation/script/multi_blink.nix b/makefu/2configs/bureautomation/script/multi_blink.nix
deleted file mode 100644
index 753918f31..000000000
--- a/makefu/2configs/bureautomation/script/multi_blink.nix
+++ /dev/null
@@ -1,60 +0,0 @@
-{lib, ... }:
-let
- # TODO: flash with different delay
-
- # let an entity blink for X times with a delay of Y milliseconds
- flash_entity = { entity, delay ? 500, count ? 4, alias ? "${entity}_blink_${toString count}_${toString delay}" }:
- {
- inherit alias;
- sequence = lib.flatten (builtins.genList (i: [
- { service = "homeassistant.turn_on";
- data.entity_id = entity;
- }
- { delay.milliseconds = delay; }
- { service = "homeassistant.turn_off";
- data.entity_id = entity;
- }
- { delay.milliseconds = delay; }
- ]
- ) count);
- };
-in {
- services.home-assistant.config.script =
- {
- buzz_red_led = (flash_entity {
- entity = "light.redbutton_buzzer";
- alias = "Red Button Buzz";
- count = 4;
- });
- buzz_red_led_fast = (flash_entity {
- entity = "light.redbutton_buzzer";
- delay = 250;
- count = 2;
- alias = "Red Button Buzz fast";
- });
- blitz_10s = (flash_entity {
- entity = "switch.blitzdings";
- delay = 10000;
- count = 1;
- alias = "blitz for 10 seconds";
- });
- blasen_10s = (flash_entity {
- entity = "switch.frosch_blasen";
- delay = 10000;
- count = 1;
- alias = "blasen for 10 seconds";
- });
- blasen_30s = (flash_entity {
- entity = "switch.frosch_blasen";
- delay = 30000;
- count = 1;
- alias = "blasen for 30 seconds";
- });
- schlechteluft = (flash_entity {
- entity = "switch.bauarbeiterlampe";
- alias = "Schlechte Luft Lampe 5 secs";
- delay = 5000;
- count = 1;
- });
- };
-}