Skip to content

Instantly share code, notes, and snippets.

@joogps
Last active July 16, 2023 13:33
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joogps/35e9071b1faaa6f152c3455878264a19 to your computer and use it in GitHub Desktop.
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 presses
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 = {'arrow_right': 'RIGHT', 'arrow_down' : 'DOWN', 'arrow_left':
'LEFT', 'arrow_up': 'UP', 'select': 'ENTER', 'back': 'BACK', 'information':
'HOME'} %} {{ key_map[trigger.event.data['key_name']] }}"
@ispiropoulos
Copy link

Neat!!!

@joogps
Copy link
Author

joogps commented Oct 1, 2020

@ispiropoulos i'm glad you liked it!

@Drafteed
Copy link

Thx for great solution!

@benjaminrau
Copy link

Awesome! Thanks a lot :)

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

@joogps
Copy link
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