summaryrefslogtreecommitdiffstats
path: root/krebs/2configs/shack/glados/automation
diff options
context:
space:
mode:
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";
+ };
+ }
+ ];
+}