From 02c2873ba9cc24d24e6387376cd9406b3c85680c Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Wed, 2 Aug 2023 10:20:24 +0200 Subject: [PATCH] change multimedia --- utils/modules/home-assistant/multimedia.nix | 31 ++++++++++++++++----- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/utils/modules/home-assistant/multimedia.nix b/utils/modules/home-assistant/multimedia.nix index b6a95e5..cd5eadb 100644 --- a/utils/modules/home-assistant/multimedia.nix +++ b/utils/modules/home-assistant/multimedia.nix @@ -172,13 +172,18 @@ }; action = [ { - service = "androidtv.adb_command"; - target = { - device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931"; - }; - data = { - command = "POWER"; - }; + conditions = [ "{{ states('media_player.android_tv_metz_cloonar_com') != 'off'}}" ]; + sequence = [ + { + service = "androidtv.adb_command"; + target = { + device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931"; + }; + data = { + command = "POWER"; + }; + } + ]; } { service = "denonavr.get_command"; @@ -223,6 +228,18 @@ command = "POWER"; }; } + { + delay = 5; + } + { + service = "androidtv.adb_command"; + target = { + device_id = "a5e50f268f3a2dbd0741fb8e9ff7f931"; + }; + data = { + command = "adb shell am start -a android.intent.action.VIEW -d content://android.media.tv/passthrough/com.mediatek.tvinput%2F.hdmi.HDMIInputService%2FHDMI100004"; + }; + } ]; }; # "automation multimedia input" = {