summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/shutdown_button.nix
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2022-09-26 15:36:25 +0200
committerlassulus <lassulus@lassul.us>2022-09-26 15:36:25 +0200
commit059a5b48af9f6c21c3c442bb0fc35d2105d3b682 (patch)
tree15de5c35d213d677bc2b294fc411d0f43dc536b2 /makefu/2configs/home/ham/automation/shutdown_button.nix
parent4d7aacdd1c2a8cc9f6d826cb7e3bb2bc10e36a5e (diff)
parent5b9d7e47c3f1877bcffdf2aafac712451db43d61 (diff)
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/home/ham/automation/shutdown_button.nix')
-rw-r--r--makefu/2configs/home/ham/automation/shutdown_button.nix11
1 files changed, 8 insertions, 3 deletions
diff --git a/makefu/2configs/home/ham/automation/shutdown_button.nix b/makefu/2configs/home/ham/automation/shutdown_button.nix
index 4c12be277..ec1a25567 100644
--- a/makefu/2configs/home/ham/automation/shutdown_button.nix
+++ b/makefu/2configs/home/ham/automation/shutdown_button.nix
@@ -1,5 +1,8 @@
let
btn = "sensor.arbeitszimmer_btn1_action";
+ lib = import ../lib;
+ say = lib.say.living_room;
+
all_lights = [
# Wohnzimmer
"light.wled"
@@ -21,6 +24,8 @@ let
all_media_player = [
"media_player.living_room"
"media_player.office"
+ "media_player.bedroom"
+
];
in {
services.home-assistant.config.automation =
@@ -30,13 +35,13 @@ in {
{
platform = "state";
entity_id = btn;
- to = "on";
+ to = "single";
}
];
condition = [ ];
- action = [
+ action = (say "Alles Aus" )++ [
{
- service = "home_assistant.turn_off";
+ service = "light.turn_off";
target.entity_id = all_lights;
}
{ service = "media_player.media_stop";