github Nerwyn/android-tv-card v2.1.3
Kodi Keyboard Support

latest releases: 4.0.5, 4.0.5-alpha.009, 4.0.5-alpha.008...
12 months ago

This release adds keyboard support for Kodi. It only supports the textbox and search methods, as the Input.SendText Kodi API clears the text input each time it is called. To enable keyboard support for Kodi:

  • Set keyboard_id (formerly adb_id, which has been deprecated but gets internally copied to keyboard_id) to you Kodi media player ID from the Home Assistant Kodi integration.
  • Set keyboard_mode to KODI.

Keyboard support for other media platforms is contingent on the ability to do so via their Home Assistant (or community) integrations and demand.

This release also soft-deprecates the adb_id field and renames it to keyboard_id. Like the _row fields before this, it will continue to work and internally gets copied to the keyboard_id field.

Try using this Kodi config to start:

type: custom:android-tv-card
keyboard_id: media_player.kodi
keyboard_mode: KODI
rows:
  - - back
    - home
    - menu
  - - info
    - play_pause
  - - - volume_buttons
    - navigation_touchpad
    - - textbox
      - null
      - search
touchpad_height: 200px
enable_double_click: true
double_click_keycode: back
long_click_keycode: menu
custom_keys:
  up:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Up
  down:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Down
  left:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Left
  right:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Right
  center:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Select
  back:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Back
  search:
    icon: mdi:kodi
    key: SEARCH
  volume_mute:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Application.SetMute
      mute: toggle
  volume_up:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Application.SetVolume
      volume: increment
  volume_down:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Application.SetVolume
      volume: decrement
  menu:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.ContextMenu
  home:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Home
  info:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Input.Info
  play_pause:
    service: kodi.call_method
    service_data:
      entity_id: media_player.kodi
      method: Player.PlayPause
      playerid: 1
card_mod:
  style: |
    toucharea {
      background-image: url("https://upload.wikimedia.org/wikipedia/commons/thumb/2/25/Kodi-logo-Thumbnail-light-transparent.png/600px-Kodi-logo-Thumbnail-light-transparent.png?20141126003611");
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      opacity: 1.0;
    }

Additional changes:

  • Improved ha-icon-button css to work better with card-mod when changing button or icon size, like so:
ha-icon-button[title="search"],
ha-icon-button[title="search"] > ha-icon {
  color: rgb(9, 179, 232);     
  height: 100px;
  width: 100px;
}
  • Removed flex-grow from buttons
  • Removed min-height from rows and columns to allow for smaller icons

Don't miss a new android-tv-card release

NewReleases is sending notifications on new releases.