Skip to content

Commit

Permalink
Add livingroom video switch remote script (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnatt authored Aug 13, 2024
1 parent f39f65f commit 594cc03
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/livingroom_remote_tv.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
################################################################################
# Script to control devices using the living room remote
# Controls the livingroom tv using the livingroom remote
#
# This script is used by automations and defines the base64 commands
# for the remote once for each command
Expand Down
84 changes: 84 additions & 0 deletions scripts/livingroom_remote_video_switch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
################################################################################
# Controls the livingroom video switch using the livingroom remote
#
# This script is used by automations and defines the base64 commands
# for the remote once for each command
#
# https://www.home-assistant.io/integrations/script/
################################################################################
livingroom_remote_video_switch:
description: >-
Controls the livingroom video switch using the livingroom remote
fields:
command:
description: "The command name for the livingroom video switch remote"
example: "power"
sequence:
- choose:
- conditions:
- condition: template
value_template: "{{ command == 'input_1' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBoAAABJ5IUEhQRFBEUERQRFBEUERQ1FDYUNhQ2FDYUNRQ2F\
DYUERQ2FBEUERQRFBEUERQRFBEUERQ2FDYUNRQ2FDYUNhQ1FAAFGQABKUkUAA\
xPAAEoSRQADFAAAShIFAAMUQABJ0gUAA0FAAAAAAAAAAAAAAAAAAA="
- conditions:
- condition: template
value_template: "{{ command == 'input_2' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBoAAABJZUSExITEhMSExITEhMSExI4EjgROBI4EjgSOBI4E\
TkRFBE4EjgSExITEhMSExITEhMSExITEjgSOBI4ETkROBI4EgAFGwABJksSAA\
xSAAElSxIADFIAASdKEQAMUgABKEkSAA0FAAAAAAAAAAAAAAAAAAA="
- conditions:
- condition: template
value_template: "{{ command == 'input_3' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBwAAABJJURFBITEhMSExITEhMSExI4EjgRORE4EjgSOBI4E\
TkRFBE4EjoQORETEhMSExITEhMSExITEhQROBI4EjgSOBI4EQAFHAABJ0oSAA\
xUAAElSxIADFMAASVLEwAMUQABJ0oTAAxRAAEoSRQADQUAAAAAAAA="
- conditions:
- condition: template
value_template: "{{ command == 'input_4' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBoAAABJ5IUERQRFBITEhMSExITEhM2FDYUNhQ2FDUUNhQ2F\
DYUERQ2FBEUERQ1FBITEhMSExITEhQ1FDYUERQ2FDYUNhQ1FAAFGgABKEkUAA\
xPAAEoSRQADE8AASlJGgAMSQABJ0kUAA0FAAAAAAAAAAAAAAAAAAA="
- conditions:
- condition: template
value_template: "{{ command == 'input_5' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBoAAABJ5MUERQRFBEUERQRFBEUERQ2FDUVNRQ2FDYUNhQ1F\
DYUERQ2FBEUNhQ2FBEUERQRFBEUERQ1FBITEhM2FDYUNhQ2FAAFGgABKEgUAA\
xQAAEoSRQADE8AAShJFAAMUAABJ0kUAA0FAAAAAAAAAAAAAAAAAAA="
- conditions:
- condition: template
value_template: "{{ command == 'power' }}"
sequence:
- action: remote.send_command
target:
entity_id: remote.brd_01_remote
data:
command: "b64:JgBgAAABJ5IUERQRFBEVERMSExITEhQ1FDYUNhQ2FDYUNRQ2F\
DYUERQRFBEUNhQ2FBEUERQRFBEUNRQ2FBEUERQ2FDYUNhQ2EwAFGQABKUkUAA\
xOAAEpSBQADE8AASlIFAANBQAAAAAAAA=="
2 changes: 0 additions & 2 deletions scripts/livingroom_tv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
livingroom_tv:
alias: living room tv
description: "Toggles the TV, sound bar, and hdmi switch in the living room"
icon: mdi:power
mode: single
sequence:
- service: remote.send_command
data:
Expand Down

0 comments on commit 594cc03

Please sign in to comment.