summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/shutdown_button.nix
diff options
context:
space:
mode:
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 4c12be27..ec1a2556 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";