Last active
July 16, 2023 13:33
-
-
Save joogps/35e9071b1faaa6f152c3455878264a19 to your computer and use it in GitHub Desktop.
Home Assistant automation for calling webostv.button on HomeKit Remote key presses
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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']] }}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Awesome! Thanks a lot :)
I utilized it on my setup: https://gist.github.com/benjaminrau/d93a4ac062609740a3fdd3aef3ad342c