summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/shutdown_button.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2022-09-23 23:41:30 +0200
committermakefu <github@syntax-fehler.de>2022-09-23 23:41:30 +0200
commit3e8f855f60dfa5bf56ab3a1d1a54e0accccbd618 (patch)
tree85674a93388edfb7a0646b46aafc18d64d7aa0c6 /makefu/2configs/home/ham/automation/shutdown_button.nix
parent2dfde5dc6d37fb5bab8a1b658cfe7e5b21f5a2f4 (diff)
ma ham: update
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";