Releases: Nerwyn/android-tv-card
2.1.0 - Kodi Keyboard Support
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
(formerlyadb_id
, which has been deprecated but gets internally copied tokeyboard_id
) to you Kodi media player ID from the Home Assistant Kodi integration. - Set
keyboard_mode
toKODI
.
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;
}
2.0.1 - TypeScript Refactor
This is a huge under the hood release which ports the project to TypeScript! While it won't be noticeable for end users, it makes this project much more modern, maintainable, and easier to add future features to.
As part of the refactoring done for this release, the old method for creating rows by creating keys contain _row
in them has been soft-deprecated in favor of the new rows
array. Old configurations will continue to work but will not be able to take advantage of the new features of the new rows
array. The new rows
key contains an array of arrays, with each entry in it being a row. You can also create sub-arrays within the arrays in rows to create columns, and sub-arrays within columns to create more rows. While this sounds confusing and can be hard to visualize, I've included a few examples in the README like this one below:
type: custom:android-tv-card
remote_id: remote.google_chromecast
media_player_id: media_player.google_chromecast
adb_id: media_player.google_chromecast_adb
title: Example
rows:
- - back
- power
- home
- - keyboard
- search
- volume_slider
- - - netflix
- null
- youtube
- null
- spotify
- navigation_touchpad
- - previous
- play_pause
- next
Changes:
- Refactored/ported to TypeScript, with proper typings (no anys!) and use of external packages like lit-element and custom-card-helpers.
- Soft-deprecated
_rows
keys in favor of a singlerows
array. - Added support for columns within rows, which can contain even more nested alternating rows and columns.
- Tweaked vibrations so direction keys and slider movement use the softer
selection
haptic whilecenter
uses thelight
haptic. - Fixed
enable_slider_feedback
so haptics can be disabled for the slider. - Reduced padding, so elements may appear more spaced out and closer to the left and right edges after this update.
- Fixed volume slider render check to work for nested string arrays past the second level.
- Await card helpers even though they're being called via
custom-card-helpers
to help prevent rendering issues. - Increased retries for rendering volume sliders in attempt to reduce frequency of
custom:my-slider
doesn't exist error. (which can be fixed by refreshing anyway).
2.0.0 - TypeScript Refactor and Columns
This is a huge under the hood release which ports the project to TypeScript! While it won't be noticeable for end users, it makes this project much more modern, maintainable, and easier to add future features to.
As part of the refactoring done for this release, the old method for creating rows by creating keys contain _row
in them has been soft-deprecated in favor of the new rows
array. Old configurations will continue to work but will not be able to take advantage of the new features of the new rows
array. The new rows
key contains an array of arrays, with each entry in it being a row. You can also create sub-arrays within the arrays in rows to create columns, and sub-arrays within columns to create more rows. While this sounds confusing and can be hard to visualize, I've included a few examples in the README like this one below:
type: custom:android-tv-card
remote_id: remote.google_chromecast
media_player_id: media_player.google_chromecast
adb_id: media_player.google_chromecast_adb
title: Example
rows:
- - back
- power
- home
- - keyboard
- search
- volume_slider
- - - netflix
- null
- youtube
- null
- spotify
- navigation_touchpad
- - previous
- play_pause
- next
Changes:
- Refactored/ported to TypeScript, with proper typings (no anys!) and use of external packages like lit-element and custom-card-helpers.
- Soft-deprecated
_rows
keys in favor of a singlerows
array. - Added support for columns within rows, which can contain even more nested alternating rows and columns.
- Tweaked vibrations so direction keys and slider movement use the softer
selection
haptic whilecenter
uses thelight
haptic. - Fixed
enable_slider_feedback
so haptics can be disabled for the slider. - Reduced padding, so elements may appear more spaced out and closer to the left and right edges after this update.
1.5.3 - Seamless Keyboard Input
This release adds the ability to send text to Android TV in a seamless live manner!
The keyboard
button now activates several listeners and pulls up your on screen keyboard (on mobile), allowing you to type and send text to your Android TV live without any intermediary prompt. It will also capture keys like backspace, delete, enter, left, and right and send appropriate commands to Android TV (although left and right may not perform as expected depending on where the cursor is on the Android TV). You can also paste by either clicking CTRL + V
when the keyboard listeners are active, or holding down on the keyboard icon and selecting paste.
Like the old method? You can still use it by creating a button called textbox
instead. The search
button is also still available for Google Assistant searches.
- Seamless text entry using several input and key event listeners, found by creating a button named
keyboard
.- Legacy bulk method can still be found by creating a button named
textbox
, along with Google Assistant search using a button namedsearch
.
- Legacy bulk method can still be found by creating a button named
- Use alternate volume icons by setting
alt_volume_icons
to true (really a convenience feature for me as I prefermdi:volume-high
,mdi:volume-medium
, andmdi:volume-variant-off
for volume up, down, and mute).
Minor version fixes:
- Use separate timers and intervals for click, touch, and hold events which should help prevent weird behavior caused by pressing too many different things too quickly.
- Route almost all events to use
onButtonClick
and moved vibration logic into it. - Refactor keyboard button to behave much more like other buttons and simplified CSS.
- Refactor button element to be the same size as icon instead larger with icon in top left.
- Fix long touchpad clicks on iOS.
1.5.2 - Seamless Keyboard Input
This release adds the ability to send text to Android TV in a seamless live manner!
The keyboard
button now activates several listeners and pulls up your on screen keyboard (on mobile), allowing you to type and send text to your Android TV live without any intermediary prompt. It will also capture keys like backspace, delete, enter, left, and right and send appropriate commands to Android TV (although left and right may not perform as expected depending on where the cursor is on the Android TV). You can also paste by either clicking CTRL + V
when the keyboard listeners are active, or holding down on the keyboard icon and selecting paste.
Like the old method? You can still use it by creating a button called textbox
instead. The search
button is also still available for Google Assistant searches.
- Seamless text entry using several input and key event listeners, found by creating a button named
keyboard
.- Legacy bulk method can still be found by creating a button named
textbox
, along with Google Assistant search using a button namedsearch
.
- Legacy bulk method can still be found by creating a button named
- Use alternate volume icons by setting
alt_volume_icons
to true (really a convenience feature for me as I prefermdi:volume-high
,mdi:volume-medium
, andmdi:volume-variant-off
for volume up, down, and mute).
Minor version fixes:
- Use separate timers and intervals for click, touch, and hold events which should help prevent weird behavior caused by pressing too many different things too quickly.
- Route almost all events to use
onButtonClick
and moved vibration logic into it. - Refactor keyboard button to behave much more like other buttons and simplified CSS.
- Refactor button element to be the same size as icon instead larger with icon in top left.
1.5.1 - Seamless Keyboard Input
This release adds the ability to send text to Android TV in a seamless live manner!
The keyboard
button now activates several listeners and pulls up your on screen keyboard (on mobile), allowing you to type and send text to your Android TV live without any intermediary prompt. It will also capture keys like backspace, delete, enter, left, and right and send appropriate commands to Android TV (although left and right may not perform as expected depending on where the cursor is on the Android TV). You can also paste by either clicking CTRL + V
when the keyboard listeners are active, or holding down on the keyboard icon and selecting paste.
Like the old method? You can still use it by creating a button called textbox
instead. The search
button is also still available for Google Assistant searches.
- Seamless text entry using several input and key event listeners, found by creating a button named
keyboard
.- Legacy bulk method can still be found by creating a button named
textbox
, along with Google Assistant search using a button namedsearch
.
- Legacy bulk method can still be found by creating a button named
- Use alternate volume icons by setting
alt_volume_icons
to true (really a convenience feature for me as I prefermdi:volume-high
,mdi:volume-medium
, andmdi:volume-variant-off
for volume up, down, and mute).
1.4.6 - Remappable Long Press Touchpad Commands
Allows for long clicks on the touchpad to be remappable by using the long_click_keycode
input.
1.4.4 - Better Double Click Logic
This release further refactors double click logic to better prevent single and double clicks from both firing when the user double clicks slowly. Now it shouldn't be possible for both single and double clicks to be triggered by the same series of clicks regardless of user clicking speed (or at least I really hope it shouldn't).
- Single click actions no longer occur on double click when double click is enabled (for real this time).
1.4.3 - Use Original Icons For Custom Buttons if No Icon Provided
Small change that will use the original icons for custom keys and sources if no icon is provided.
1.4.2 - Fix Double Click Touchpad Logic
Double Click logic was a little broken when this repo was forked. While it was enabled by default, single clicks would also occur on double click unless enable_double_click
was explicitly set to true. Enabling double click also introduces a delay in single clicks so that there is time for the card to determine if a single or double click is event occurring, In order to not degrade performance double clicks on the touchpad are now disabled by default.
- Double clicks disabled by default, but can still be enabled by setting
enable_double_click
to true. - Single click actions no longer occur on double click when double click is enabled.