diff options
author | makefu <github@syntax-fehler.de> | 2021-12-04 17:30:13 +0100 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2021-12-04 17:30:13 +0100 |
commit | add6d81efc452f6e6dd1adeb9323ef597430cf4d (patch) | |
tree | 9db4e26eadc59c6670dc9b8200d33e90d7882477 | |
parent | 9301506249292633447910c4273573b82915d59c (diff) |
shack glados: init ampel
-rw-r--r-- | krebs/2configs/shack/glados/automation/ampel.nix | 23 | ||||
-rw-r--r-- | krebs/2configs/shack/glados/default.nix | 1 |
2 files changed, 24 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"; + }; + } + ]; +} diff --git a/krebs/2configs/shack/glados/default.nix b/krebs/2configs/shack/glados/default.nix index 51c2ad94f..e7860338c 100644 --- a/krebs/2configs/shack/glados/default.nix +++ b/krebs/2configs/shack/glados/default.nix @@ -40,6 +40,7 @@ in { ./automation/shack-startup.nix ./automation/party-time.nix ./automation/hass-restart.nix + ./automation/ampel.nix ]; services.home-assistant = |