This is how you can connect your Android TV devices using ADB to your Home assistant setup. This will require developer access to your device which can be easily activated.

  • In order to activate a developer mode in your device, go into settings->build number -> press 8 times until a message showing you are now a developer will show up. Close it.
  • Make sure your device has an internal static IP so you can configure it in your homeassistant configuration.yaml
  • Add to configuration.yaml:

media_player:
- platform: androidtv
name: Cellcom TV
host: 192.168.1.15
  • Restart home assistant
  • Search your newly created entity with the name that you gave it.

May be an image of food and text that says 'Developer Tools STATES SERVICES TEMPLATE EVENTS The service dev tool allows you to call any available service in Home Assistant. androidtv.adb_command media_player.cellcom_tv media_ r.cellcom_tv Service Data (YAM, optional) entity_ media_player.cell.com_tv tv ommand: HOME CALL SERVICE Send an ADB command to an Android TV / Fire TV device. Parameter Description entity_ic Name(s) of Android TV Fire TV entities. command Either key command FILLEXAMPLE DATA an ADB shell command. Example media_player.android_tv_living_rom HOME'
  • Add it to the UI
May be an image of food
  • If you can’t control certain buttons – the solution is simple; Create a script and trigger it through a UI button with the following data:
entity_id: media_player.cellcom_tv
command: HOME # Or any other command (this script will trigger the home button)

Home assistant integration page:
 https://www.home-assistant.io/integrations/androidtv