diff options
Diffstat (limited to 'krebs/2configs/shack/glados/automation/shack-startup.nix')
-rw-r--r-- | krebs/2configs/shack/glados/automation/shack-startup.nix | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/krebs/2configs/shack/glados/automation/shack-startup.nix b/krebs/2configs/shack/glados/automation/shack-startup.nix index 35314923b..ac7dd4f1e 100644 --- a/krebs/2configs/shack/glados/automation/shack-startup.nix +++ b/krebs/2configs/shack/glados/automation/shack-startup.nix @@ -2,12 +2,20 @@ # binary_sensor.portal_lock # sensor.keyholder # media_player.lounge + +# additional state required on: +# mpd.shack: +# playlist "ansage" +# playlist "lassulus" +# lounge.kiosk.shack: +# playlist "ansage" + let glados = import ../lib; in [ { - alias = "Greet new keyholder for key exchange"; + alias = "Bedanken bei Übernahme von Key"; initial_state = true; trigger = { platform = "state"; @@ -15,15 +23,22 @@ in }; condition = { condition = "template"; - value_template = "{{ trigger.from_state.state != 'No Keyholder' }}"; + value_template = "{{ (trigger.from_state.state != 'No Keyholder') and (trigger.from_state.state != 'No Keyholder') }}"; }; - action = glados.say.kiosk "Danke {{trigger.to_state.state}} für das Übernehmen des Keys von {{trigger.from_state.state}}"; - # action = []; + action = glados.say.kiosk "Danke {{ trigger.to_state.state }} für das Übernehmen des Keys von {{ trigger.from_state.state }}"; + } + { + alias = "Keyholder Begrüßen wenn MPD hoch fährt"; + initial_state = true; + trigger = { + platform = "state"; + from = "unavailable"; + entity_id = "media_player.kiosk"; + }; + action = glados.say.kiosk (builtins.readFile ./announcement.j2); } - { alias = "Start Music on portal lock on"; - # TODO: use "power" trigger trigger = { platform = "state"; entity_id = "binary_sensor.portal_lock"; @@ -61,7 +76,7 @@ in media_content_id = "ansage"; }; } - { delay.seconds = 8; } + { delay.seconds = 8.5; } { service = "media_player.volume_set"; data = { @@ -74,7 +89,7 @@ in data = { entity_id = "media_player.lounge"; media_content_type = "playlist"; - media_content_id = "lassulus superradio"; + media_content_id = "lassulus"; }; } ]; |