summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/ham/automation/light_buttons.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-12-30 12:59:53 +0100
committerlassulus <lassulus@lassul.us>2020-12-30 12:59:53 +0100
commit053044834c1af30a90ced1338ae4342a445a2946 (patch)
treeadb34854b427b4ed8f5746e08bc918976b2fdf72 /makefu/2configs/ham/automation/light_buttons.nix
parent423f7c56a95576f728c9abfa201f328bbb3875c3 (diff)
parent60a492344bf224982978fd6765aaaadbaf4effc1 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/ham/automation/light_buttons.nix')
-rw-r--r--makefu/2configs/ham/automation/light_buttons.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/makefu/2configs/ham/automation/light_buttons.nix b/makefu/2configs/ham/automation/light_buttons.nix
index 7b43027f1..32d134ecc 100644
--- a/makefu/2configs/ham/automation/light_buttons.nix
+++ b/makefu/2configs/ham/automation/light_buttons.nix
@@ -1,3 +1,9 @@
+# light.wohnzimmerbeleuchtung
+# light.wohnzimmer_deko
+# light.arbeitszimmerbeleuchtung
+# light.arbeitszimmer_deko
+# light.schlafzimmerbeleuchtung
+
let
toggle = light: btn:
{
@@ -9,7 +15,8 @@ let
};
action = {
service = "light.toggle";
- entity = light;
+ data.entity_id = light;
+ data.transition = 0;
};
};
turn_off_all = btn:
@@ -22,12 +29,16 @@ let
};
action = {
service = "light.turn_off";
- entity = "light.alle_lichter";
+ entity_id = "all";
};
};
in {
services.home-assistant.config.automation = [
- (toggle "light.wohnzimmer_lichter" "btn3")
- (turn_off_all "btn3")
+ (toggle "light.arbeitszimmerbeleuchtung" "arbeitszimmer_btn1")
+ (toggle "light.schlafzimmerbeleuchtung" "schlafzimmer_btn2")
+ (toggle "light.wohnzimmerbeleuchtung" "wohnzimmer_btn3")
+ (turn_off_all "arbeitszimmer_btn1")
+ (turn_off_all "schlafzimmer_btn2")
+ (turn_off_all "wohnzimmer_btn3")
];
}