Universal Remote Card - Buttons, Touchpads, Sliders, and Keyboards for Multiple Platforms

It works. Big thank you!

Keyboard doesnt work. It says androidtv.adb_command not found.

Another peculiar thing I observe is that I am not able to edit the yaml config properly. When I try to edit/ delete some sections, the cursor suddenly just goes to the top left corner of the window, to the beginning of the code. Its as though the visual editor wont let me edit it. Even when I delete the entire yaml I am still able to see the remote in the right preview pane.

Are you sure that your platform is set to Kodi, and that it isn’t overridden by any custom keyboard actions?

The cursor jumping is an issue with the code boxes and appears in some default cards. Which editor mode is this for? The entire card? The layout tab? An action?

The cursor is jumping when editing the entire card. I am left with no option but to create the yaml on notepad and replace the entire contents. When I try to delete a few lines, it does not allow me. This is quite problematic.

Unfortunately that’s a Home Assistant issue, I don’t have control over the entire card YAML editor, just the subsection ones. Can you try and see if it also happens with other custom cards? Why not use the UI editor?

1 Like

I had forgotten the line

platform: Kodi

Hence the keyboard not working. Got it going.

I can edit the yaml just fine from the raw config editor, but not from the individual card. I had copied the conifg directory of another build to this one in the hopes of copying over all settings etc but that hadnt worked. Then I manually installed a bunch of stuff from HACS anyway. Hope that isnt causing the issues.

since updating my Android TV to version 12, some commands do not work anymore (e.g. TV, CHANNEL_UP and CHANNEL_DOWN). Other still do (e.g. dpad commands or HOME).
Did someone experience the same issue?

Think, I’ve had the same problem.
Solution: my Bravia Integration has been broken.

Removed it completely and added it again.
Now it works

4.1.0 has been released!

This version implements a massive overhaul of the templating system. Almost all of the Home Assistant templating extensions have been implemented into ha-nunjucks, my instantaneous synchronous frontend only alternative templating system for Home Assistant. This includes Pythonic datetimes! See the ha-nunjucks README for more information on all of the new templating functions, filters, and tests.

This version also adds a new action - Evaluate JS. If you know how to write JavaScript, you can now do so as an action. Just be careful that you don’t break anything!

1 Like

Can anyone provide insight as to why this isn’t triggering any action, it works in other cards:

type: custom:android-tv-card
platform: Apple TV
custom_actions:

  • type: button
    name: Sopranos
    icon: custom_icon_0
    styles: |-
    :host {
    –icon-color: rgb(210, 51, 66);
    tap_action:
    action: call-service
    service_data:
    entity_id: media_player.masterbedroom
    media_content_type: url
    media_content_id: >-
    Where's Johnny? - The Sopranos (Season 5, Episode 3) - Apple TV
    remote_id: remote.masterbedroom
    rows:
  • youtubetv
  • touchpad
  • volume_up
  • volume_down
  • home
  • Sopranos
    custom_icons:
  • name: custom_icon_0

Read the README, and use the configuration UI. service_data should be data, and call-service should be perform-action. You’re also missing the perform_action (formerly called service) field which I’m guessing should be media_player.play_media. There’s a button on the bottom of the first tab of the configuration UI which will update deprecated configs, including outdated actions (formerly called service calls, renamed by the Home Assistant developers a few monthly release ago) like yours.

Sorry I have a few issues I have not been able to resolve.

type: custom:android-tv-card
remote_id: remote.shield
keyboard_id: media_player.android_tv_192_168_1_233
platform: Android TV
media_player_id: media_player.shield_2
rows:
 - keyboard
 - search
 - captions
  1. ‘- keboard’ ignores the string and sends ‘i’ only (Android Debug Bridge configured, connected to my Nvidia Shield with the corresponding keyboard_id)
  2. ‘- captions’ is not working at all, is that a strictly roki feature?
  3. ‘- search’ initiates google assistant correct string and finds what I need but ends with a voice command/waiting waiting for voice input (locks everything up for a while)

Is there a way to make the touchpad bigger? I can not figure out the code.

Thanks

keyboard only sending i and search also triggering voice input sound like really weird bugs, but I’m not sure what to do about them since they work fine on my Google TVs.

The Android TV default keys comes from the Python library list. It may not work on all Android TVs.

The width is defined by your card layout and Home Assistant. The height can be changed using CSS styles under the appearance section of a custom touchpad action.

.toucharea {
  height: 400px;
}
1 Like

@Nerwyn is their a tutorial on how to edit images like this into svg to fit the icon part. I could not find any good youtube videos to help me use this icon for my plex icon.

I don’t know if there’s a tutorial. The custom svg paths was something added in the project this card was forked from that I’ve continued to use but haven’t expanded much upon. You do need to copy just the path fields from within the SVG XML.

where would i copy the svg xml. sorry not understanding how? noobie to this?

The SVG XML has a bunch of elements named path with attributes named d. The The d attribute contains the commands that draw the SVG icon. You need to copy all of the path commands into the editor and then modify it as needed. To be honest it probably won’t work well with that icon, as this card’s custom icon feature was made to work with binary icons. You may be better off using a background image, like in this example.

Easiest way I’ve found to build custom icons/svg is with Adobe Illustrator.
Took me 2mins to build this one from your low-res screenshot:

Link to the svg file:

https://www.dropbox.com/scl/fi/xgdpbnqhl2h1png2a9tzg/plex-test2.svg?rlkey=yifoi6fdb2rmi5sgjp6lplgj7&st=ijcg8m66&dl=0

More details here:

1 Like

Hi.
i love this card and its working nicely.
i would like to know how is it possible to run and a button from this card using script
for example how i can run this in a script:

type: button
name: freetv
icon: mdi:television-box
tap_action:
action: source
source: tv.freetv.androidtv

key and source are shortcuts for different actions. As of 4.1.1, these actions vary by platform. For Android TV, it uses the remote.turn_on action as described in the Home Assistant Android TV Remote integration documentation.

action: remote.turn_on
data:
  activity: tv.freetv.androidtv
target:
  entity_id: remote.android_tv