summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/automation
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2021-12-04 17:30:13 +0100
committermakefu <github@syntax-fehler.de>2021-12-04 17:30:13 +0100
commitadd6d81efc452f6e6dd1adeb9323ef597430cf4d (patch)
tree9db4e26eadc59c6670dc9b8200d33e90d7882477 /krebs/2configs/shack/glados/automation
parent9301506249292633447910c4273573b82915d59c (diff)
shack glados: init ampel
Diffstat (limited to 'krebs/2configs/shack/glados/automation')
-rw-r--r--krebs/2configs/shack/glados/automation/ampel.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/krebs/2configs/shack/glados/automation/ampel.nix b/krebs/2configs/shack/glados/automation/ampel.nix
new file mode 100644
index 000000000..4be92a328
--- /dev/null
+++ b/krebs/2configs/shack/glados/automation/ampel.nix
@@ -0,0 +1,23 @@
+# needs:
+# binary_sensor.lounge_ampel_status
+# light.lounge_ampel_licht_rot
+
+let
+ glados = import ../lib;
+in
+{
+ services.home-assistant.config.automation =
+ [
+ {
+ alias = "Ampel Rotes Licht";
+ initial_state = true;
+ trigger = {
+ platform = "state";
+ entity_id = "binary_sensor.lounge_ampel_status";
+ };
+ action = { service = "light.turn_on";
+ data.entity_id = "light.lounge_ampel_licht_rot";
+ };
+ }
+ ];
+}