summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home/ham/automation/shutdown_button.nix
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
committermakefu <github@syntax-fehler.de>2023-07-28 22:24:15 +0200
commit060a8f28fa1fc648bdf66afb31a5d1efac868837 (patch)
tree2b354eacc7897365ee45244fe7a51720e0d0333f /makefu/2configs/home/ham/automation/shutdown_button.nix
parentcbfcc890e3b76d942b927809bf981a5fa7289e6a (diff)
makefu: move out to own repo, add vacation-note
Diffstat (limited to 'makefu/2configs/home/ham/automation/shutdown_button.nix')
-rw-r--r--makefu/2configs/home/ham/automation/shutdown_button.nix56
1 files changed, 0 insertions, 56 deletions
diff --git a/makefu/2configs/home/ham/automation/shutdown_button.nix b/makefu/2configs/home/ham/automation/shutdown_button.nix
deleted file mode 100644
index ec84bbe9..00000000
--- a/makefu/2configs/home/ham/automation/shutdown_button.nix
+++ /dev/null
@@ -1,56 +0,0 @@
-let
- btn = "sensor.arbeitszimmer_btn1_action";
- lib = import ../lib;
- say = lib.say.living_room;
-
- all_lights = [
- # Wohnzimmer
- "light.wled"
- "light.wled_2"
- "light.wohnzimmer_komode_osram"
- "light.wohnzimmer_schrank_osram"
- "light.wohnzimmer_fenster_lichterkette_licht"
-
- # Arbeitszimmer
- "light.wled_3"
- "light.wled_4"
- "light.arbeitszimmer_schrank_dimmer"
- "light.arbeitszimmer_pflanzenlicht"
- "light.wohnzimmer_stehlampe_osram"
-
- # Keller
- "light.keller_osram"
- ];
- all_media_player = [
- "media_player.living_room"
- "media_player.office"
- "media_player.bedroom"
-
- ];
-in {
- services.home-assistant.config.automation =
- [
- { alias = "Wohnung shutdown single click";
- trigger = [
- {
- platform = "state";
- entity_id = btn;
- to = "single";
- }
- ];
- condition = [ ];
- action = (say "Alles Aus" )++ [
- {
- service = "light.turn_off";
- target.entity_id = all_lights;
- }
- { service = "media_player.media_stop";
- target.entity_id = all_media_player;
- }
- { service = "script.turn_on";
- target.entity_id = "script.alle_heizungen_aus";
- }
- ];
- }
- ];
-}