From 3e8f855f60dfa5bf56ab3a1d1a54e0accccbd618 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 23 Sep 2022 23:41:30 +0200 Subject: ma ham: update --- makefu/2configs/home/ham/automation/shutdown_button.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'makefu/2configs/home/ham/automation/shutdown_button.nix') 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"; -- cgit v1.2.3