From add6d81efc452f6e6dd1adeb9323ef597430cf4d Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 4 Dec 2021 17:30:13 +0100 Subject: shack glados: init ampel --- krebs/2configs/shack/glados/automation/ampel.nix | 23 +++++++++++++++++++++++ krebs/2configs/shack/glados/default.nix | 1 + 2 files changed, 24 insertions(+) create mode 100644 krebs/2configs/shack/glados/automation/ampel.nix (limited to 'krebs/2configs/shack/glados') 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 = -- cgit v1.2.3