From 14f05eb886992d64fc5b245dc45819a9cb06708f Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 4 Dec 2021 17:31:26 +0100 Subject: ma ham: update light automation --- makefu/2configs/home/ham/light/arbeitszimmer.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'makefu/2configs/home/ham/light/arbeitszimmer.nix') diff --git a/makefu/2configs/home/ham/light/arbeitszimmer.nix b/makefu/2configs/home/ham/light/arbeitszimmer.nix index bc60678b3..45fbfb57b 100644 --- a/makefu/2configs/home/ham/light/arbeitszimmer.nix +++ b/makefu/2configs/home/ham/light/arbeitszimmer.nix @@ -6,7 +6,8 @@ let ]; arbeitszimmerbeleuchtung = [ "light.arbeitszimmer_schrank_dimmer" - "light.arbeitszimmer_kerze" # arbeitszimmer_kerze + "light.arbeitszimmer_kerze" + "light.arbeitszimmer_pflanzenlicht" ]; in { services.home-assistant.config.light = [ @@ -20,5 +21,22 @@ in { name = "Arbeitszimmer Deko"; entities = arbeitszimmer_deko; } + { platform = "switch"; + name = "Arbeitszimmer Pflanzenlicht"; + entity_id = "switch.arbeitszimmer_stecker1"; + } + ]; + services.home-assistant.config.automation = [ + { + alias = "Toggle Arbeitszimmerbeleuchtung via Remote"; + trigger = { + platform = "state"; + entity_id = "sensor.arbeitszimmer_remote1_action"; + }; + action = { + service = "light.toggle"; + data.entity_id = "light.arbeitszimmerbeleuchtung"; + }; + } ]; } -- cgit v1.2.3