You need to open your remote in the new configuration UI and click on UPDATE OLD CONFIG
at the bottom of the general tab. It’s mentioned in the v4 post above, the v4 release notes, and the README.
Anyone got working yaml for keyboard to work? Using an ADB device it always says One of entity_id must be provided.
I’ve provided the ADB device like this just to test.
- type: custom:android-tv-card
remote_id: remote.living_room_google_tv
media_player_id: media_player.living_room_google_tv
rows:
- keyboard
If you use the configuration UI, there’s a field for keyboard_id
.
I use a yaml config for HA so don’t think that’s possible.
Oops, Missed it. Was expecting manual changes / not used to seeing transition tools like this, great work. Thanks for your support.
I’m trying to get this set up for my SamsungTV. I was using the TV Remote Card but this seems to have a few limitations - and also looks abandoned.
With the other remote, I was able to add buttons to go immediately to a particular channel. I used the following code to do this:
bbc_1:
icon: mdi:numeric-1-box
service: media_player.play_media
service_data:
entity_id: media_player.kitchentv
media_content_id: '101'
media_content_type: channel
I’m not sure how I would add that to this remote though.
Also - selecting a source doesn’t seem to function either. Not sure what is going on there!
Use the configuration UI! You should just have to provide your Samsung TV entity IDs and set platform to Samsung. You can also add custom actions using the UI for new sources.
With the source, I have added a new button in the UI, but it isn’t working. I know there is a native Netfilx button, but this is basically so I can see how to add my other sources. I can select Netflix using the media player source selector (and in my old remote), but this doesn’t seem to do anything.
this is the YAML from the new button:
type: button
name: NetflixNew
autofill_entity_id: true
icon: phu:netflix-alt
entity_id: media_player.kitchentv
value_attribute: friendly_name
tap_action:
action: source
source: Netflix
remote_id: remote.kitchentv
So I have managed to create a change source button, however I had to do it using the ‘Perform Action’ option in tap behaviour as the ‘Source’ option doesn’t seem to work. This is the button code now:
type: button
name: NetflixNew
autofill_entity_id: true
icon: phu:netflix-alt
entity_id: media_player.kitchentv
tap_action:
action: perform-action
perform_action: media_player.select_source
target:
entity_id: media_player.kitchentv
data:
source: Netflix
Per the README, the source action is shortcut for remote.turn_on
, not media_player.select_source
.
Thanks for that!
Absolutely awesome work by the way!! It really is a fantastic remote! Looking forward to building a few more remotes for my other TV’s
Remember everyone! The current default sources lists for the new platforms are limited, and I could use help expanding them.
Love this thing, now trying my best to make it look pretty. Is there a way to change colors of individual default buttons (spotify green, youtube red, etc)? I figured out the css style for the custom buttons, but cant get it for the default ones…
Create a custom action with the same name as the source button with autofill enabled. It’ll autofill with the default key/source information. Make sure the action and icon autofills correctly, as it may prematurely autofill with the name of a shorter default key/source like y
instead of youtube
. If it does change the icon and set the tap action to default. From there you can apply CSS styles to it under the appearances panel. See this example in the README.
The new visual editor has me confused a bit. I pasted my old kodi remote config, pressed “Update Old Config” but some things wont work. For eg on the touchpad, tapping once used to send a “return” which was like the “Ok” or “Enter”. That does not work now and gives the error “Action : remote.send_command not found” Similarly I had a double tap mapped to back, that also doesnt work.
I used the visual editor to add few elements and the touchpad in that works fine unlike my old one. But I had my volume buttons in my old config mapped to my AVR and not to Kodi, dont know how to achieve that in the new one. Also unsure how to use double tap and long press in the new one.
Would be very appreciative of any help. Thank you.
My old raw config yaml as below
type: custom:android-tv-card
keyboard_id: media_player.kodi
rows:
- - back
- home
- menu
- - info
- play_pause
- stop
- - - volume_buttons
- touchpad
- - textbox
- null
- search
- null
- fullscreen
long_click_keycode: menu
custom_actions:
- type: button
name: up
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Up
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
icon: mdi:chevron-up
mode: single
- type: button
name: down
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Down
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
icon: mdi:chevron-down
mode: single
- type: button
name: left
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Left
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
icon: mdi:chevron-left
mode: single
- type: button
name: right
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Right
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
icon: mdi:chevron-right
mode: single
- type: button
name: center
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: return
keymap: KB
target:
entity_id: media_player.kodi
icon: mdi:kodi
mode: single
- type: button
name: back
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: backspace
keymap: KB
target:
entity_id: media_player.kodi
icon: mdi:arrow-left-bold
mode: single
- type: button
name: volume_mute
tap_action:
data:
method: Application.SetMute
mute: toggle
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:volume-mute
- type: button
name: volume_up
tap_action:
data:
method: Application.SetVolume
volume: increment
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
hold_action:
action: repeat
icon: mdi:volume-plus
- type: button
name: volume_down
tap_action:
data:
method: Application.SetVolume
volume: decrement
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
hold_action:
action: repeat
icon: mdi:volume-minus
- type: button
name: menu
tap_action:
data:
method: Input.ContextMenu
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:menu
- type: button
name: home
tap_action:
data:
method: Input.Home
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:home
- type: button
name: info
tap_action:
data:
method: Input.Info
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:information
- type: button
name: play_pause
tap_action:
data:
method: Player.PlayPause
playerid: 1
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:play-pause
- type: button
name: stop
tap_action:
data:
method: Player.Stop
playerid: 1
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:stop
- icon: mdi:fullscreen
mode: single
name: fullscreen
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Tab
keymap: KB
target:
entity_id: media_player.kodi
type: button
- type: touchpad
name: touchpad
tap_action:
action: key
key: DPAD_CENTER
up:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Up
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: up
type: button
down:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Down
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: down
type: button
left:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Left
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: left
type: button
right:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Right
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: right
type: button
styles: |-
toucharea {
height: 400px;
}
haptics: false
double_tap_action:
action: key
key: back
hold_action:
action: key
key: menu
platform: Kodi
That YAML is in the new format (custom_actions
is a list instead of a dict/object). Do you still have a copy of the old config? Your new one is working fine for me on my Kodi dev instance.
Have you read the new README? It has instructions with screenshots on how to use the configuration UI.
Ok, maybe the yaml got written over when I did an Update Old Config.
I can see the descriptive readme but pool old me is having a tough time adapting it to my needs
Appreciate your help, the old yaml is below. As I mentioned, the only things not working are the center button (single tap), long press and double tap.
type: custom:android-tv-card
keyboard_id: media_player.kodi
keyboard_mode: KODI
rows:
- - back
- home
- menu
- - info
- play_pause
- stop
- - - vol_buttons
- touchpad
- - textbox
- null
- search
- null
- fullscreen
touchpad_style:
height: 400px
enable_touchpad_feedback: false
enable_double_click: true
double_click_keycode: back
long_click_keycode: menu
custom_keys:
up:
icon: mdi:chevron-up
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: Up
keymap: KB
entity_id: media_player.kodi
mode: single
down:
icon: mdi:chevron-down
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: Down
keymap: KB
entity_id: media_player.kodi
mode: single
left:
icon: mdi:chevron-left
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: Left
keymap: KB
entity_id: media_player.kodi
mode: single
right:
icon: mdi:chevron-right
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: Right
keymap: KB
entity_id: media_player.kodi
mode: single
center:
icon: mdi:kodi
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: return
keymap: KB
entity_id: media_player.kodi
mode: single
back:
icon: mdi:arrow-left
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: backspace
keymap: KB
entity_id: media_player.kodi
mode: single
volume_mute:
icon: mdi:volume-mute
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Application.SetMute
mute: toggle
volume_up:
icon: mdi:volume-minus
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Application.SetVolume
volume: decrement
volume_down:
icon: mdi:volume-plus
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Application.SetVolume
volume: increment
menu:
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Input.ContextMenu
home:
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Input.Home
info:
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Input.Info
play_pause:
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Player.PlayPause
playerid: 1
stop:
service: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Player.Stop
playerid: 1
fullscreen:
icon: mdi:fullscreen
service: kodi.call_method
service_data:
method: Input.ButtonEvent
button: Tab
keymap: KB
entity_id: media_player.kodi
mode: single
- type: media-control
entity: media_player.kodi
Try this, it’s working for me.
type: custom:android-tv-card
keyboard_id: media_player.kodi
rows:
- - back
- home
- menu
- - info
- play_pause
- stop
- - - volume_buttons
- touchpad
- - textbox
- null
- search
- null
- fullscreen
platform: Kodi
custom_actions:
- type: button
name: back
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: backspace
keymap: KB
target:
entity_id: media_player.kodi
icon: mdi:arrow-left
mode: single
- type: button
name: volume_mute
tap_action:
data:
method: Application.SetMute
mute: toggle
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:volume-mute
- type: button
name: volume_up
tap_action:
data:
method: Application.SetVolume
volume: decrement
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
hold_action:
action: repeat
icon: mdi:volume-minus
- type: button
name: volume_down
tap_action:
data:
method: Application.SetVolume
volume: increment
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
hold_action:
action: repeat
icon: mdi:volume-plus
- type: button
name: menu
tap_action:
data:
method: Input.ContextMenu
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:menu
- type: button
name: home
tap_action:
data:
method: Input.Home
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:home
- type: button
name: play_pause
tap_action:
data:
method: Player.PlayPause
playerid: 1
target:
entity_id: media_player.kodi
action: perform-action
perform_action: kodi.call_method
icon: mdi:play-pause
- icon: mdi:fullscreen
mode: single
name: fullscreen
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Tab
keymap: KB
target:
entity_id: media_player.kodi
type: button
- type: touchpad
name: touchpad
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.Select
up:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Up
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: up
type: button
down:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Down
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: down
type: button
left:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Left
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: left
type: button
right:
tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ButtonEvent
button: Right
keymap: KB
target:
entity_id: media_player.kodi
hold_action:
action: repeat
mode: single
name: right
type: button
styles: |-
toucharea {
height: 400px;
}
haptics: false
double_tap_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.Back
hold_action:
action: perform-action
perform_action: kodi.call_method
data:
method: Input.ContextMenu
target: {}
- type: button
name: stop
tap_action:
action: perform-action
perform_action: kodi.call_method
target:
entity_id: media_player.kodi
data:
method: Player.Stop
playerid: 1
icon: mdi:stop
media_player_id: media_player.kodi
The upgrade process isn’t perfect, especially for really old configs, so there’s bound to be some issues.
I also don’t think you need the keymap
fields in your custom actions, as I don’t include them in the new Kodi default key maps and they work fine without them.
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?