Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save blizzrdof77/5dbcf0afb2adb6bb676cbde2ec6c09e2 to your computer and use it in GitHub Desktop.
Save blizzrdof77/5dbcf0afb2adb6bb676cbde2ec6c09e2 to your computer and use it in GitHub Desktop.
HASS Extended SofaBaton Emulated Roku Blueprint
blueprint:
name: Emulated Roku Extended
description: Create Automations for Emulated Roku Keypresses
domain: automation
input:
emulated_roku_name:
name: Emulated Roku Name
description: The name of the Emulated Roku
selector:
text:
multiline: false
multiple: false
up_action:
name: '"Up" Button
'
description: 'Action to run, when the "Up" button is pressed
'
default: []
selector:
action: {}
right_action:
name: '"Right" Button
'
description: 'Action to run, when the "Right" button is pressed
'
default: []
selector:
action: {}
down_action:
name: '"Down" Button
'
description: 'Action to run, when the "Down" button is pressed
'
default: []
selector:
action: {}
left_action:
name: '"Left" Button
'
description: 'Action to run, when the "Left" button is pressed
'
default: []
selector:
action: {}
home_action:
name: '"Home" Button
'
description: 'Action to run, when the "Home" button is pressed
'
default: []
selector:
action: {}
search_action:
name: '"Search" Button
'
description: 'Action to run, when the "Search" button is pressed
'
default: []
selector:
action: {}
rev_action:
name: '"Rev" Button
'
description: 'Action to run, when the "Rev" button is pressed
'
default: []
selector:
action: {}
fwd_action:
name: '"Fwd" Button
'
description: 'Action to run, when the "Fwd" button is pressed
'
default: []
selector:
action: {}
play_action:
name: '"Play" Button
'
description: 'Action to run, when the "Play" button is pressed
'
default: []
selector:
action: {}
select_action:
name: '"Select" Button
'
description: 'Action to run, when the "Select" button is pressed
'
default: []
selector:
action: {}
back_action:
name: '"Back" Button
'
description: 'Action to run, when the "Back" button is pressed
'
default: []
selector:
action: {}
instantreplay_action:
name: '"InstantReplay" Button
'
description: 'Action to run, when the "InstantReplay" button is pressed
'
default: []
selector:
action: {}
info_action:
name: '"Info" Button
'
description: 'Action to run, when the "Info" button is pressed
'
default: []
selector:
action: {}
backspace_action:
name: '"BackSpace" Button
'
description: 'Action to run, when the "BackSpace" button is pressed
'
default: []
selector:
action: {}
enter_action:
name: '"Enter" Button
'
description: 'Action to run, when the "Enter" button is pressed
'
default: []
selector:
action: {}
emulated_app_1_action:
name: '"Emulated App 1" Button
'
description: 'Action to run, when the "Emulated App 1" button is pressed
'
default: []
selector:
action: {}
emulated_app_2_action:
name: '"Emulated App 2" Button
'
description: 'Action to run, when the "Emulated App 2" button is pressed
'
default: []
selector:
action: {}
emulated_app_3_action:
name: '"Emulated App 3" Button
'
description: 'Action to run, when the "Emulated App 3" button is pressed
'
default: []
selector:
action: {}
emulated_app_4_action:
name: '"Emulated App 4" Button
'
description: 'Action to run, when the "Emulated App 4" button is pressed
'
default: []
selector:
action: {}
emulated_app_5_action:
name: '"Emulated App 5" Button
'
description: 'Action to run, when the "Emulated App 5" button is pressed
'
default: []
selector:
action: {}
emulated_app_6_action:
name: '"Emulated App 6" Button
'
description: 'Action to run, when the "Emulated App 6" button is pressed
'
default: []
selector:
action: {}
emulated_app_7_action:
name: '"Emulated App 7" Button
'
description: 'Action to run, when the "Emulated App 7" button is pressed
'
default: []
selector:
action: {}
emulated_app_8_action:
name: '"Emulated App 8" Button
'
description: 'Action to run, when the "Emulated App 8" button is pressed
'
default: []
selector:
action: {}
emulated_app_9_action:
name: '"Emulated App 9" Button
'
description: 'Action to run, when the "Emulated App 9" button is pressed
'
default: []
selector:
action: {}
inputạv1_action:
name: '"InputẠV1" Button
'
description: 'Action to run, when the "InputẠV1" button is pressed
'
default: []
selector:
action: {}
inputhdmi1_action:
name: '"InputHDMI1" Button
'
description: 'Action to run, when the "InputHDMI1" button is pressed
'
default: []
selector:
action: {}
inputhdmi2_action:
name: '"InputHDMI2" Button
'
description: 'Action to run, when the "InputHDMI2" button is pressed
'
default: []
selector:
action: {}
inputhdmi3_action:
name: '"InputHDMI3" Button
'
description: 'Action to run, when the "InputHDMI3" button is pressed
'
default: []
selector:
action: {}
inputhdmi4_action:
name: '"InputHDMI4" Button
'
description: 'Action to run, when the "InputHDMI4" button is pressed
'
default: []
selector:
action: {}
inputtuner_action:
name: '"InputTuner" Button
'
description: 'Action to run, when the "InputTuner" button is pressed
'
default: []
selector:
action: {}
ok_action:
name: '"Ok" Button
'
description: 'Action to run, when the "Ok" button is pressed
'
default: []
selector:
action: {}
poweron_action:
name: '"PowerOn" Button
'
description: 'Action to run, when the "PowerOn" button is pressed
'
default: []
selector:
action: {}
poweroff_action:
name: '"PowerOff" Button
'
description: 'Action to run, when the "PowerOff" button is pressed
'
default: []
selector:
action: {}
volumedown_action:
name: '"VolumeDown" Button
'
description: 'Action to run, when the "VolumeDown" button is pressed
'
default: []
selector:
action: {}
volumemute_action:
name: '"VolumeMute" Button
'
description: 'Action to run, when the "VolumeMute" button is pressed
'
default: []
selector:
action: {}
volumeup_action:
name: '"VolumeUp" Button
'
description: 'Action to run, when the "VolumeUp" button is pressed
'
default: []
selector:
action: {}
source_url: https://community.home-assistant.io/t/emulated-roku/325451
mode: single
max_exceeded: silent
variables:
emulated_roku_name: !input emulated_roku_name
trigger:
- platform: event
event_type: roku_command
condition:
- condition: template
value_template: '{{ trigger.event.data.source_name == emulated_roku_name }}'
- condition: template
value_template: '{{ trigger.event.data.type == "keypress" }}'
action:
- variables:
key_id: '{{ trigger.event.data.key }}'
- choose:
- conditions: '{{ key_id == "Up" }}'
sequence: !input up_action
- conditions: '{{ key_id == "Right" }}'
sequence: !input right_action
- conditions: '{{ key_id == "Down" }}'
sequence: !input down_action
- conditions: '{{ key_id == "Left" }}'
sequence: !input left_action
- conditions: '{{ key_id == "Home" }}'
sequence: !input home_action
- conditions: '{{ key_id == "Search" }}'
sequence: !input search_action
- conditions: '{{ key_id == "Rev" }}'
sequence: !input rev_action
- conditions: '{{ key_id == "Fwd" }}'
sequence: !input fwd_action
- conditions: '{{ key_id == "Play" }}'
sequence: !input play_action
- conditions: '{{ key_id == "Select" }}'
sequence: !input select_action
- conditions: '{{ key_id == "Back" }}'
sequence: !input back_action
- conditions: '{{ key_id == "InstantReplay" }}'
sequence: !input instantreplay_action
- conditions: '{{ key_id == "Info" }}'
sequence: !input info_action
- conditions: '{{ key_id == "BackSpace" }}'
sequence: !input backspace_action
- conditions: '{{ key_id == "Enter" }}'
sequence: !input enter_action
- conditions: '{{ key_id == "Emulated App 1" }}'
sequence: !input emulated_app_1_action
- conditions: '{{ key_id == "Emulated App 2" }}'
sequence: !input emulated_app_2_action
- conditions: '{{ key_id == "Emulated App 3" }}'
sequence: !input emulated_app_3_action
- conditions: '{{ key_id == "Emulated App 4" }}'
sequence: !input emulated_app_4_action
- conditions: '{{ key_id == "Emulated App 5" }}'
sequence: !input emulated_app_5_action
- conditions: '{{ key_id == "Emulated App 6" }}'
sequence: !input emulated_app_6_action
- conditions: '{{ key_id == "Emulated App 7" }}'
sequence: !input emulated_app_7_action
- conditions: '{{ key_id == "Emulated App 8" }}'
sequence: !input emulated_app_8_action
- conditions: '{{ key_id == "Emulated App 9" }}'
sequence: !input emulated_app_9_action
- conditions: '{{ key_id == "InputẠV1" }}'
sequence: !input inputạv1_action
- conditions: '{{ key_id == "InputHDMI1" }}'
sequence: !input inputhdmi1_action
- conditions: '{{ key_id == "InputHDMI2" }}'
sequence: !input inputhdmi2_action
- conditions: '{{ key_id == "InputHDMI3" }}'
sequence: !input inputhdmi3_action
- conditions: '{{ key_id == "InputHDMI4" }}'
sequence: !input inputhdmi4_action
- conditions: '{{ key_id == "InputTuner" }}'
sequence: !input inputtuner_action
- conditions: '{{ key_id == "Ok" }}'
sequence: !input ok_action
- conditions: '{{ key_id == "PowerOn" }}'
sequence: !input poweron_action
- conditions: '{{ key_id == "PowerOff" }}'
sequence: !input poweroff_action
- conditions: '{{ key_id == "VolumeDown" }}'
sequence: !input volumedown_action
- conditions: '{{ key_id == "VolumeMute" }}'
sequence: !input volumemute_action
- conditions: '{{ key_id == "VolumeUp" }}'
sequence: !input volumeup_action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment