I made a simple guide that shows how to control any Android TV from your iPhone using the HomeKit Remote app.
This setup maps HomeKit button presses to Android TV commands, supporting DPAD navigation, OK, Back, Home, and Play/Pause plus full volume control - all with a single, universal automation.
Prerequisites
- Android TV or Google TV connected to Home Assistant (via the androidtv integration).
- HomeKit Integration active in Home Assistant.
Important: you should bridge the media_player entity to HomeKit instead of the remote entity.
The script will automatically forward non-volume commands to the device’s remote entity.
Note: Make sure the name of the remote entity matches the media_player entity name. By default, they should be identical, so this should work for most users.
Create a Central Script
Script
Create a new script and paste the following yaml:
alias: Android TV Remote Handler
description: Controlling Android TV via HomeKit Remote
mode: parallel
fields:
remote_entity:
description: Entity ID of the remote
example: remote.android_tv
key_name:
description: Key pressed on HomeKit Remote
example: arrow_right
sequence:
- variables:
remote_entity: remote.{{ remote_entity.split('.')[1] }}
command_map:
arrow_up: DPAD_UP
arrow_down: DPAD_DOWN
arrow_left: DPAD_LEFT
arrow_right: DPAD_RIGHT
select: DPAD_CENTER
back: BACK
information: HOME
- target:
entity_id: "{{ remote_entity }}"
data:
command: "{{ command_map[key_name] | default('') }}"
num_repeats: 1
delay_secs: 0
hold_secs: 0
action: remote.send_command
max: 10
What does it do?
- Creates a mapping between HomeKit key_name and Android TV commands (DPAD, ENTER, BACK, etc.).
- Automatically forwards commands to the correct remote entity derived from the media_player name.
- Allows multiple simultaneous executions (mode: parallel) so button presses won’t block each other.
- Sends the command via remote.send_command.
Create a General Automation
Create a new automation and paste the following yaml:
alias: Handle Any HomeKit Remote
description: Listen to any HomeKit remote and send the command to the correct device
mode: parallel
trigger:
- platform: event
event_type: homekit_tv_remote_key_pressed
action:
- service: script.android_tv_remote_handler
data:
remote_entity: "{{ trigger.event.data.entity_id }}"
key_name: "{{ trigger.event.data.key_name }}"
What does it do?
- Takes the entity_id from the event → identifies which remote/TV to target.
- Takes the key_name from the event → identifies which button was pressed.
- Runs the script we created earlier which handles the command.
Notes:
- Volume buttons work in HomeKit because the media_player entity is bridged for volume.
All other buttons (arrows, select, home, back) are sent via the remote entity derived from the media_player name. - Long-press actions are not supported. HomeKit does not expose long-press events for the TV Remote, so all commands are treated as single presses only.
- This approach can be adapted to other devices (Samsung TVs, IR remotes, or any remote entity) by updating the command mapping.
This guide only has the mapping for Android TV

