From fe7ee6a4903793043eff66271ce8e2c47c6c3912 Mon Sep 17 00:00:00 2001 From: jmcnatt Date: Mon, 12 Aug 2024 22:02:04 -0700 Subject: [PATCH 1/4] Fix directory path for scripts --- configuration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.yaml b/configuration.yaml index 00069c0..146763a 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -124,7 +124,7 @@ rest: !include rest.yaml # script # https://www.home-assistant.io/integrations/script script: !include scripts.yaml -script split: !include_dir_named ../scripts +script split: !include_dir_named scripts/ # sensor # https://www.home-assistant.io/integrations/sensor/ From e77c9b30bb526ad31c7b419435567b9fd97a36f8 Mon Sep 17 00:00:00 2001 From: jmcnatt Date: Mon, 12 Aug 2024 22:13:10 -0700 Subject: [PATCH 2/4] Use `include_dir_merge_named` --- configuration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.yaml b/configuration.yaml index 146763a..6d8abb1 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -124,7 +124,7 @@ rest: !include rest.yaml # script # https://www.home-assistant.io/integrations/script script: !include scripts.yaml -script split: !include_dir_named scripts/ +script split: !include_dir_merge_named scripts/ # sensor # https://www.home-assistant.io/integrations/sensor/ From 03e5d045abcd253f8924fc18d1f36adca7055762 Mon Sep 17 00:00:00 2001 From: jmcnatt Date: Mon, 12 Aug 2024 22:19:52 -0700 Subject: [PATCH 3/4] Fixed conditionals --- scripts/livingroom_remote_tv.yaml | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/scripts/livingroom_remote_tv.yaml b/scripts/livingroom_remote_tv.yaml index 71083c5..deb3839 100644 --- a/scripts/livingroom_remote_tv.yaml +++ b/scripts/livingroom_remote_tv.yaml @@ -18,7 +18,7 @@ livingroom_remote_tv: - choose: - conditions: - condition: template - value_template: "{{ command = 'power' }}" + value_template: "{{ command == 'power' }}" sequence: - action: remote.send_command target: @@ -30,7 +30,7 @@ livingroom_remote_tv: TAAxPAAEnSRMADE4AASdJEwANBQAAAAAAAA==" - conditions: - condition: - value_template: "{{ command = 'volume_up' }}" + value_template: "{{ command == 'volume_up' }}" sequence: - action: remote.send_command target: @@ -41,7 +41,7 @@ livingroom_remote_tv: xPAAEnShIADE8AAShJEwAMTwABJ0oSAA0FAAAAAAAAAAAAAAAAAAA=" - conditions: - condition: - value_template: "{{ command = 'volume_down' }}" + value_template: "{{ command == 'volume_down' }}" sequence: - action: remote.send_command target: @@ -52,7 +52,7 @@ livingroom_remote_tv: PAAEnSRMADQUAAAAAAAAAAAAAAAAAAA==" - conditions: - condition: - value_template: "{{ command = 'volume_mute' }}" + value_template: "{{ command == 'volume_mute' }}" sequence: - action: remote.send_command target: @@ -63,7 +63,7 @@ livingroom_remote_tv: RAAElSxEADFAAAShJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'channel_up' }}" + value_template: "{{ command == 'channel_up' }}" sequence: - action: remote.send_command target: @@ -74,7 +74,7 @@ livingroom_remote_tv: xPAAEnSRMADE8AAShJEgANBQAAAAAAAA==" - conditions: - condition: - value_template: "{{ command = 'channel_down' }}" + value_template: "{{ command == 'channel_down' }}" sequence: - action: remote.send_command target: @@ -85,7 +85,7 @@ livingroom_remote_tv: xPAAEoSBMADE8AASdJEwANBQAAAAAAAA==" - conditions: - condition: - value_template: "{{ command = 'input' }}" + value_template: "{{ command == 'input' }}" sequence: - action: remote.send_command target: @@ -96,7 +96,7 @@ livingroom_remote_tv: xPAAEoSBMADFAAASZJEwANBQAAAAAAAA==" - conditions: - condition: - value_template: "{{ command = 'number_1' }}" + value_template: "{{ command == 'number_1' }}" sequence: - action: remote.send_command target: @@ -107,7 +107,7 @@ livingroom_remote_tv: AAEoSRIADE8AAShJEwAMTwABKEkSAA0F" - conditions: - condition: - value_template: "{{ command = 'number_2' }}" + value_template: "{{ command == 'number_2' }}" sequence: - action: remote.send_command target: @@ -118,7 +118,7 @@ livingroom_remote_tv: xQAAEoShAADFIAASdJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_3' }}" + value_template: "{{ command == 'number_3' }}" sequence: - action: remote.send_command target: @@ -129,7 +129,7 @@ livingroom_remote_tv: xRAAEnShAADQU=" - conditions: - condition: - value_template: "{{ command = 'number_4' }}" + value_template: "{{ command == 'number_4' }}" sequence: - action: remote.send_command target: @@ -140,7 +140,7 @@ livingroom_remote_tv: xNAAEoSRQADE4AASVLEwANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_5' }}" + value_template: "{{ command == 'number_5' }}" sequence: - action: remote.send_command target: @@ -151,7 +151,7 @@ livingroom_remote_tv: xNAAEpSRIADE4AASlIFAANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_6' }}" + value_template: "{{ command == 'number_6' }}" sequence: - action: remote.send_command target: @@ -162,7 +162,7 @@ livingroom_remote_tv: xOAAEoSRIADE8AAShJEgANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_7' }}" + value_template: "{{ command == 'number_7' }}" sequence: - action: remote.send_command target: @@ -173,7 +173,7 @@ livingroom_remote_tv: xPAAEoSRIADFAAASdJEwANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_8' }}" + value_template: "{{ command == 'number_8' }}" sequence: - action: remote.send_command target: @@ -184,7 +184,7 @@ livingroom_remote_tv: xQAAEpSBEADQU=" - conditions: - condition: - value_template: "{{ command = 'number_9' }}" + value_template: "{{ command == 'number_9' }}" sequence: - action: remote.send_command target: @@ -195,7 +195,7 @@ livingroom_remote_tv: xPAAEoSREADE8AAShJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'number_0' }}" + value_template: "{{ command == 'number_0' }}" sequence: - action: remote.send_command target: @@ -206,7 +206,7 @@ livingroom_remote_tv: xQAAEoSRAADFAAAShJEwANBQ==" - conditions: - condition: - value_template: "{{ command = 'sleep' }}" + value_template: "{{ command == 'sleep' }}" sequence: - action: remote.send_command target: @@ -217,7 +217,7 @@ livingroom_remote_tv: xQAAEmSxEADFAAASZLEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'settings' }}" + value_template: "{{ command == 'settings' }}" sequence: - action: remote.send_command target: @@ -228,7 +228,7 @@ livingroom_remote_tv: xQAAEoSREADFAAAShJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_up' }}" + value_template: "{{ command == 'nav_up' }}" sequence: - action: remote.send_command target: @@ -239,7 +239,7 @@ livingroom_remote_tv: xQAAEmSxEADFEAASVLEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_down' }}" + value_template: "{{ command == 'nav_down' }}" sequence: - action: remote.send_command target: @@ -250,7 +250,7 @@ livingroom_remote_tv: xRAAEmSxEADFEAASVLEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_left' }}" + value_template: "{{ command == 'nav_left' }}" sequence: - action: remote.send_command target: @@ -261,7 +261,7 @@ livingroom_remote_tv: xOAAEoSREADFEAASdJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_right' }}" + value_template: "{{ command == 'nav_right' }}" sequence: - action: remote.send_command target: @@ -272,7 +272,7 @@ livingroom_remote_tv: xQAAEmSxEADFAAASZLEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_ok' }}" + value_template: "{{ command == 'nav_ok' }}" sequence: - action: remote.send_command target: @@ -283,7 +283,7 @@ livingroom_remote_tv: xQAAEmSxAADFAAASZLEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_back' }}" + value_template: "{{ command == 'nav_back' }}" sequence: - action: remote.send_command target: @@ -294,7 +294,7 @@ livingroom_remote_tv: xRAAEnSRAADFAAAShJEQANBQ==" - conditions: - condition: - value_template: "{{ command = 'nav_exit' }}" + value_template: "{{ command == 'nav_exit' }}" sequence: - action: remote.send_command target: From b0404e105ebebe2bf10cc32e6646b2ace83e6481 Mon Sep 17 00:00:00 2001 From: jmcnatt Date: Mon, 12 Aug 2024 22:24:36 -0700 Subject: [PATCH 4/4] Added missing conditional value --- scripts/livingroom_remote_tv.yaml | 50 +++++++++++++++---------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/scripts/livingroom_remote_tv.yaml b/scripts/livingroom_remote_tv.yaml index deb3839..e8cfc93 100644 --- a/scripts/livingroom_remote_tv.yaml +++ b/scripts/livingroom_remote_tv.yaml @@ -29,7 +29,7 @@ livingroom_remote_tv: xPAAEpSBMADE8AASdJEwAMTgABKEkTAAxOAAEoSRIADE8AASdJEwAMTgABKEg\ TAAxPAAEnSRMADE4AASdJEwANBQAAAAAAAA==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'volume_up' }}" sequence: - action: remote.send_command @@ -40,7 +40,7 @@ livingroom_remote_tv: zYTNxMSEjcTEhITEhITEhMSEhITNxITEjcSNxM3EjcTNxI3EwAFIwABJ0oTAA\ xPAAEnShIADE8AAShJEwAMTwABJ0oSAA0FAAAAAAAAAAAAAAAAAAA=" - conditions: - - condition: + - condition: template value_template: "{{ command == 'volume_down' }}" sequence: - action: remote.send_command @@ -51,7 +51,7 @@ livingroom_remote_tv: YTNxM2EzcSEhMSExISExISExITEhISEzcSNxM3EjcTNhM3EwAFIwABKEkTAAx\ PAAEnSRMADQUAAAAAAAAAAAAAAAAAAA==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'volume_mute' }}" sequence: - action: remote.send_command @@ -62,7 +62,7 @@ livingroom_remote_tv: kROBE5ERQQFBE5EBQRFBEUERQQFBE5EDkRFBE4ETkQORE4EQAFJgABJ0oQAAx\ RAAElSxEADFAAAShJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'channel_up' }}" sequence: - action: remote.send_command @@ -73,7 +73,7 @@ livingroom_remote_tv: jcTNxISExITEhMSEhITEhMSEhITNxM2EzcSNxM2EzcTNhM3EwAFJAABJ0kTAA\ xPAAEnSRMADE8AAShJEgANBQAAAAAAAA==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'channel_down' }}" sequence: - action: remote.send_command @@ -84,7 +84,7 @@ livingroom_remote_tv: jcTNhM3EhMSEhMSExISEhMSExITEhI3EzYTNxM2EzcSNxM3EgAFJAABKEkSAA\ xPAAEoSBMADE8AASdJEwANBQAAAAAAAA==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'input' }}" sequence: - action: remote.send_command @@ -95,7 +95,7 @@ livingroom_remote_tv: zYTNxI3EzYTEhM2ExITEhMSEhITEhMSEzYTEhM2EzcTNhM2EwAFJAABJ0kTAA\ xPAAEoSBMADFAAASZJEwANBQAAAAAAAA==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_1' }}" sequence: - action: remote.send_command @@ -106,7 +106,7 @@ livingroom_remote_tv: YUNhM2ExITEhMRFDYTEhMRFBEUERM2FDYSNxMSEzYUNhI3EwAFIwABKEkTAAxP\ AAEoSRIADE8AAShJEwAMTwABKEkSAA0F" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_2' }}" sequence: - action: remote.send_command @@ -117,7 +117,7 @@ livingroom_remote_tv: DkROBEUETgRFBEUETgRFBEUERQQOREUEDkRORAUETkQORE5EAAFJgABJ0oQAA\ xQAAEoShAADFIAASdJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_3' }}" sequence: - action: remote.send_command @@ -128,7 +128,7 @@ livingroom_remote_tv: TkQORE4ETkRFBISEzcQFRAUEhMRFBISETkQOREUETgRORE4EQAFJQABKEkRAA\ xRAAEnShAADQU=" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_4' }}" sequence: - action: remote.send_command @@ -139,7 +139,7 @@ livingroom_remote_tv: zYUNhMRExIUNhMRFDYTEhISExITNhQ2ExITNhQREzYUNhM2FAAFIwABJ0kUAA\ xNAAEoSRQADE4AASVLEwANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_5' }}" sequence: - action: remote.send_command @@ -150,7 +150,7 @@ livingroom_remote_tv: zYUNhM2FBETNhMSFDYTERQRFBETEhM2ExITNhQREzYUNhM2EwAFIwABKEkTAA\ xNAAEpSRIADE4AASlIFAANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_6' }}" sequence: - action: remote.send_command @@ -161,7 +161,7 @@ livingroom_remote_tv: TcTNxITEjcSNxMSEjcTEhMSEhMSNxITEhITNxITEjcSNxM3EgAFJAABKEkTAA\ xOAAEoSRIADE8AAShJEgANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_7' }}" sequence: - action: remote.send_command @@ -172,7 +172,7 @@ livingroom_remote_tv: zcSNxM3EjcTNxISEzcSExISExITEhITEhITNxISEzcTNxI3EgAFJAABKEkSAA\ xPAAEoSRIADFAAASdJEwANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_8' }}" sequence: - action: remote.send_command @@ -183,7 +183,7 @@ livingroom_remote_tv: TkQOREUEhMQFBE5EDkRFBITEBQTNxA5ETkQFBMSETgRORE4EQAFJgABJ0kRAA\ xQAAEpSBEADQU=" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_9' }}" sequence: - action: remote.send_command @@ -194,7 +194,7 @@ livingroom_remote_tv: TkQORE5EBQRFBE4ETkRFBAUERQRFBA5ETgRFBEUETgRORA5EQAFJQABKEkRAA\ xPAAEoSREADE8AAShJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'number_0' }}" sequence: - action: remote.send_command @@ -205,7 +205,7 @@ livingroom_remote_tv: DkROBEUERQRFBAUEzcQFRAUExISNxE5ETgRORAUETkROBE5EAAFJgABKEkRAA\ xQAAEoSRAADFAAAShJEwANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'sleep' }}" sequence: - action: remote.send_command @@ -216,7 +216,7 @@ livingroom_remote_tv: DkROBEUETkQORE4ERQRFBEUEBQRORAVEBQRFBE4ETkROBE5EAAFJgABJksRAA\ xQAAEmSxEADFAAASZLEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'settings' }}" sequence: - action: remote.send_command @@ -227,7 +227,7 @@ livingroom_remote_tv: TkQORE4ETkRFBAUERQRFBE4ERQRFBAUETkROBE5EDkRFBE4EQAFJQABKEkRAA\ xQAAEoSREADFAAAShJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_up' }}" sequence: - action: remote.send_command @@ -238,7 +238,7 @@ livingroom_remote_tv: TkQOREUEBQRFBEUERQQFBE5EBUQORE4ETkQORE5EDkRFBE4EQAFJgABJUsRAA\ xQAAEmSxEADFEAASVLEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_down' }}" sequence: - action: remote.send_command @@ -249,7 +249,7 @@ livingroom_remote_tv: TkQORE5EBQRFBEUEBUQFBE5EBQRFBE4ETkROBE5ETgRFBE4EQAFJgABJksQAA\ xRAAEmSxEADFEAASVLEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_left' }}" sequence: - action: remote.send_command @@ -260,7 +260,7 @@ livingroom_remote_tv: jcTNxI3EzYTNxITEhITEhITEhITEhMSEhMSNxI3EzcSNxM3EgAFJAABKEkSAA\ xOAAEoSREADFEAASdJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_right' }}" sequence: - action: remote.send_command @@ -271,7 +271,7 @@ livingroom_remote_tv: TgROREUEDkROBEUERQRFBAUERQROBEUERQROBE5ETgRORA5EQAFJgABJUsRAA\ xQAAEmSxEADFAAASZLEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_ok' }}" sequence: - action: remote.send_command @@ -282,7 +282,7 @@ livingroom_remote_tv: DkRORAUERQROBEUERQRFBA5ERQROBE5EBQRORE4ETkQFBE5EQAFJQABJksRAA\ xQAAEmSxAADFAAASZLEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_back' }}" sequence: - action: remote.send_command @@ -293,7 +293,7 @@ livingroom_remote_tv: TkROBEUERQQFBE5ERQQOREUEBQRORE4ETkQFBE5ERQQORE4EQAFJQABKUgRAA\ xRAAEnSRAADFAAAShJEQANBQ==" - conditions: - - condition: + - condition: template value_template: "{{ command == 'nav_exit' }}" sequence: - action: remote.send_command