summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/ham/automation/light_buttons.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2020-12-30 11:02:21 +0100
committermakefu <github@syntax-fehler.de>2020-12-30 11:02:21 +0100
commit60a492344bf224982978fd6765aaaadbaf4effc1 (patch)
tree3b43b93934fe9dae257f4d6b5982c5815578dcb3 /makefu/2configs/ham/automation/light_buttons.nix
parentdb80207267dd750d6e5fce0a4c15961aa324627b (diff)
ma ham: update config
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")
];
}