summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/ham/automation/light_buttons.nix
diff options
context:
space:
mode:
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")
];
}