Skip to content

Instantly share code, notes, and snippets.

@joogps
Last active July 16, 2023 13:33
Show Gist options
  • Select an option

  • Save joogps/35e9071b1faaa6f152c3455878264a19 to your computer and use it in GitHub Desktop.

Select an option

Save joogps/35e9071b1faaa6f152c3455878264a19 to your computer and use it in GitHub Desktop.
Home Assistant automation for calling webostv.button on HomeKit Remote key presses
- alias: Call webostv.button on HomeKit Remote key press
trigger:
platform: event
event_type: homekit_tv_remote_key_pressed
event_data:
entity_id: media_player.living_room_tv
action:
service: webostv.button
data_template:
entity_id: '{{ trigger.event.data[''entity_id''] }}'
button: "{% set key_map = {\n \"arrow_right\": \"RIGHT\",\n \"arrow_down\"\
: \"DOWN\",\n \"arrow_left\": \"LEFT\",\n \"arrow_up\": \"UP\",\n \"select\"\
: \"ENTER\",\n \"back\": \"BACK\",\n \"information\": \"HOME\",\n} %}\n\
{{ key_map[trigger.event.data['key_name']] }}"
@ispiropoulos
Copy link
Copy Markdown

Neat!!!

@joogps
Copy link
Copy Markdown
Author

joogps commented Oct 1, 2020

@ispiropoulos i'm glad you liked it!

@Drafteed
Copy link
Copy Markdown

Thx for great solution!

@benjaminrau
Copy link
Copy Markdown

Awesome! Thanks a lot :)

I utilized it on my setup: https://gist.github.com/benjaminrau/d93a4ac062609740a3fdd3aef3ad342c

@joogps
Copy link
Copy Markdown
Author

joogps commented Jan 17, 2022

@Drafteed @benjaminrau fantastic! thank you guys :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment