Home assistant

Home Assistant Android TV Integration: 2026 Setup Guide

AliExpress
TL;DR: Connect Android TV to Home Assistant by enabling Developer Mode (tap Build number 7 times), assigning a static IP, then adding the Android TV integration via UI: Settings > Devices & Services > Add Integration > Android TV. Accept the ADB debugging prompt on your TV. Send ADB commands via the androidtv.adb_command service for buttons that aren’t natively mapped.

Updated for 2026. This guide covers Android TV integration via the UI, ADB pairing, sending custom ADB commands, and fixing buttons that don’t work.

Connect Android TV to Home Assistant

The Home Assistant Android TV integration controls Android TV and Fire TV devices via ADB (Android Debug Bridge). Once set up, you get a media_player entity that shows what’s playing, current app, and lets you send commands like play, pause, home, back, or any raw ADB key event. This guide walks through the modern 2026 setup using the UI, which replaced the old configuration.yaml-based setup.

Prerequisites

  • An Android TV or Fire TV device on the same network as Home Assistant
  • The device on a static IP (DHCP reservation works fine)
  • Recent Home Assistant version (UI-based Android TV integration has been the default for several releases)

Step 1: Enable Developer Mode and USB Debugging on Android TV

The integration uses ADB, which requires Developer Mode enabled on the TV.

  1. On Android TV: Settings > Device Preferences > About (or just Settings > About)
  2. Scroll to Build number
  3. Click it 7 times in a row (older docs say 8, current Android TV is 7)
  4. A message appears: “You are now a developer”
  5. Go back to Settings, navigate to the new Developer options menu
  6. Enable USB debugging AND Network debugging (or “ADB over network”)

For Fire TV: enable Developer options the same way, plus turn on both ADB debugging and Apps from Unknown Sources.

Step 2: Set a Static IP for Your Android TV

The Home Assistant integration connects to a specific IP. If your TV’s IP changes, the integration breaks. Two ways to fix the IP:

  • DHCP reservation (recommended): in your router admin, find the TV by MAC address and reserve its current IP permanently. No changes needed on the TV itself.
  • Static IP on the TV: Settings > Network > Wi-Fi > (your network) > IP settings > Static. Enter IP, gateway, DNS manually.

Step 3: Add the Android TV Integration in Home Assistant

  1. Open Home Assistant
  2. Go to Settings > Devices & Services > Add Integration
  3. Search for Android TV and select it
  4. Enter the IP address of your Android TV
  5. Click Submit

Within a few seconds, your TV will show an “Allow USB debugging from this computer?” prompt with a fingerprint hash. Click Always allow from this computer, then OK. Home Assistant completes the pairing automatically.

The integration creates a media_player entity (e.g. media_player.bedroom_tv) that you can drop on dashboards or use in automations.

Home Assistant ADB Commands

The integration includes a service called androidtv.adb_command that sends raw ADB commands to the TV. Use this for buttons or actions not directly available through the media_player controls.

Sending key commands

You can send standard Android key events by name:

service: androidtv.adb_command
target:
  entity_id: media_player.bedroom_tv
data:
  command: HOME

Common key commands:

  • HOME – return to home screen
  • BACK – back button
  • MENU – open menu
  • UP, DOWN, LEFT, RIGHT – directional pad
  • CENTER or DPAD_CENTER – select button
  • POWER – power toggle
  • VOLUME_UP, VOLUME_DOWN, VOLUME_MUTE
  • PLAY, PAUSE, STOP
  • NEXT, PREVIOUS

Launching specific apps

Launch an app by sending an Intent:

service: androidtv.adb_command
target:
  entity_id: media_player.bedroom_tv
data:
  command: "am start -n com.netflix.ninja/.MainActivity"

Common app package names:

  • Netflix: com.netflix.ninja
  • YouTube: com.google.android.youtube.tv
  • Plex: com.plexapp.android
  • Spotify: com.spotify.tv.android
  • Disney+: com.disney.disneyplus

Find any app’s package name by running adb shell pm list packages from a computer.

Running raw shell commands

Any ADB shell command works:

service: androidtv.adb_command
target:
  entity_id: media_player.bedroom_tv
data:
  command: "input keyevent KEYCODE_TV"

Creating Scripts for Custom Buttons

If your TV remote has buttons that don’t map cleanly to media_player controls, wrap an ADB command in a script:

script:
  tv_home:
    alias: "TV Home Button"
    icon: mdi:home
    sequence:
      - service: androidtv.adb_command
        target:
          entity_id: media_player.bedroom_tv
        data:
          command: HOME

  launch_netflix:
    alias: "Launch Netflix"
    icon: mdi:netflix
    sequence:
      - service: androidtv.adb_command
        target:
          entity_id: media_player.bedroom_tv
        data:
          command: "am start -n com.netflix.ninja/.MainActivity"

Then add the scripts as buttons on your dashboard:

type: button
entity: script.tv_home
name: Home
icon: mdi:home
tap_action:
  action: call-service
  service: script.tv_home

Building a Full Android TV Remote Card

For a complete remote interface on your dashboard, combine the media_player card with scripted custom buttons:

type: vertical-stack
cards:
  - type: media-control
    entity: media_player.bedroom_tv
  - type: horizontal-stack
    cards:
      - type: button
        entity: script.tv_home
        name: Home
        icon: mdi:home
      - type: button
        entity: script.launch_netflix
        name: Netflix
        icon: mdi:netflix
      - type: button
        entity: script.launch_youtube
        name: YouTube
        icon: mdi:youtube

For a more polished remote experience, install the Android TV Card from HACS, which gives you a full D-pad style remote with customizable buttons.

Common Issues

  • Integration won’t connect: ADB debugging isn’t enabled, or “Always allow from this computer” wasn’t accepted. Restart the integration and watch for the prompt on the TV.
  • Connection drops frequently: TV is going into deep sleep. In Developer options, disable “Stay awake” or check power saving settings.
  • State stuck on “playing” or “idle”: state detection depends on the running app. Some apps don’t expose state correctly. The integration has app-specific detection rules; check the Home Assistant Android TV integration docs for tuning.
  • Commands send but TV doesn’t respond: the TV may be in a different state. Try sending POWER first to wake it.
  • “Could not connect” after working previously: ADB fingerprint expired. Reload the integration in Settings > Devices & Services, then accept the new prompt on the TV.

Conclusion

The Android TV integration in Home Assistant is mature and reliable once it’s paired. The UI-based setup replaced the old configuration.yaml approach, and ADB commands let you reach any function the TV exposes – including stuff the official Android TV remote can’t do. Combined with HA automations, you can build flows like “play news on TV when I say good morning”, “auto-launch Spotify when my morning routine triggers”, or “send to bed mode and turn the TV off when no motion for 20 minutes”.

Frequently Asked Questions

How do I integrate Android TV with Home Assistant?

Enable Developer Mode on the TV (tap Build number 7 times), turn on USB and Network debugging, set a static IP, then add the integration via Home Assistant: Settings > Devices & Services > Add Integration > Android TV. Enter the TV’s IP, then accept the “Always allow from this computer” prompt on the TV. Done.

What ADB commands work with Home Assistant Android TV?

The androidtv.adb_command service accepts standard Android key events (HOME, BACK, MENU, UP, DOWN, LEFT, RIGHT, CENTER, POWER, VOLUME_UP, PLAY, PAUSE), Intent commands to launch apps (am start -n com.netflix.ninja/.MainActivity), and any raw ADB shell command (input keyevent KEYCODE_TV). Send via service call or wrap in a script.

Why isn’t my Android TV connecting to Home Assistant?

Most common cause: ADB debugging isn’t enabled, or “Always allow from this computer” wasn’t accepted when the prompt appeared on the TV. Less common: TV is on dynamic IP that changed, or the TV is in deep sleep. Restart the integration and watch the TV screen for the pairing prompt.

How do I launch a specific app on Android TV from Home Assistant?

Use the androidtv.adb_command service with an Intent. Example: command “am start -n com.netflix.ninja/.MainActivity” launches Netflix. Get any app’s package name by running adb shell pm list packages from a computer connected to the TV.

What if some TV remote buttons don’t work in Home Assistant?

Create a Home Assistant script that sends the missing button as an ADB command. For example, a “Home” button can be a script calling androidtv.adb_command with command: HOME. Add the script as a button on your dashboard. This works for any KEYCODE the TV supports.

Do I need a static IP for my Android TV?

Yes, or at minimum a DHCP reservation. The Android TV integration connects to a specific IP address. If that IP changes, the integration loses connection. A router-side DHCP reservation is cleanest because it doesn’t require changing settings on the TV itself.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.