github Nerwyn/android-tv-card v2.0.1
TypeScript Refactor

latest releases: 4.2.0, 4.2.0-beta.001, 4.2.0-alpha.031...
14 months ago

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

ex

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 single rows 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 while center uses the light 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).

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

NewReleases is sending notifications on new releases.