From bccb2fd4e51448a2e9794acd47e7df16339f64aa Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 17 Apr 2019 20:46:58 +0200 Subject: ma bureautomation: refactor --- .../bureautomation/automation/bureau-shutdown.nix | 42 +++++++++++++++++----- 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'makefu/2configs/bureautomation/automation/bureau-shutdown.nix') diff --git a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix index c632a9e6..d54d9762 100644 --- a/makefu/2configs/bureautomation/automation/bureau-shutdown.nix +++ b/makefu/2configs/bureautomation/automation/bureau-shutdown.nix @@ -5,14 +5,40 @@ entity_id = "group.team"; from = "not_home"; to = "home"; + for.seconds = 30; }; - action = { - service = "homeassistant.turn_on"; - entity_id = [ - "switch.fernseher" - "switch.feuer" - ]; - }; + action = [ + { + service = "homeassistant.turn_on"; + entity_id = [ + "switch.fernseher" + "switch.feuer" + ]; + } + { + service = "media_player.kodi_call_method"; + data = { + entity_id = "media_player.kodi"; + method = "Player.Open"; + item.partymode = "music"; + }; + } + { + service = "tts.google_say"; + entity_id = "media_player.kodi"; + data = { + message = "Willkommen in deinem Lieblingsbüro"; + language = "de"; + }; + } + { + service = "notify.telegrambot"; + data = { + title = "Bureau Startup"; + message = "Willkommen {{ trigger.platform }}"; + }; + } + ]; } { alias = "Turn off Fernseher after last in group left"; trigger = [ @@ -42,7 +68,7 @@ service = "notify.telegrambot"; data = { title = "Bureau Shutdown"; - message = "All devices are turned off due to {{ trigger.platform }} - {{ trigger }}"; + message = "All devices are turned off due to {{ trigger.platform }}"; }; } ]; -- cgit v1.2.3