github Nerwyn/android-tv-card 3.8.0-beta.005
3.8.0-beta.005 - New Slider Features, Special Button Grids, and Custom Action Templates

latest releases: 3.8.1, 3.8.1-alpha.003, 3.8.1-alpha.002...
pre-release25 days ago

Vertical Sliders and Slider Icons #25

NOTE: Some slider default styles have changed to better support these new features. New slider style fields have been exposed to users so you can tweak slider styles as needed.

Sliders can now be vertical! Set vertical: true in their custom action. You also have to explicitly set style.height to a value like 200px. The tooltip's transform function will also be automatically adjusted to appear to the left of the slider thumb. As part of the style changes made to simplify slider styling and make it possible to create vertical sliders, --height and --border-radius have been removed. These values can now be set directly instead using height and border-radius.

Sliders can also now have an icon! This icon behaves the same as button icons. By default it follows the slider thumb, but this behavior can be changed using the new style options. See the README for more.

custom_actions:
  slider:
    vertical: true
    icon: mdi:music
    style:
      height: 175px

Special Button Grids #88

This project previously had a shortcut for direction buttons, which would just create the direction and center buttons using basic rows. You can now also build these buttons using a grid of consistent width to ensure that button horizontal spacing will remain consistent regardless of screen size using dpad. Additionally new button pad shortcuts have been added for number and game buttons, numpad, xpad, and npad. The old direction pad can still be recreated using nav_buttons.

Custom Actions Templates #91

Custom actions have a new field template (not to be confused with jinja2/nunjucks templates). Any default or custom action can now be used as a template for another custom action by setting template to the name of the first action. All fields in the custom action will be merged on top of the template action.

custom_actions:
 webostv:
    tap_action:
      action: call-service
      service: webostv.button
      target:
        entity_id: media_player.lg_smart_tv
  left:
    template: webostv
    tap_action:
      data:
        command: LEFT
  right:
    template: webostv
    tap_action:
      data:
        command: RIGHT

Other Changes

  • Remove default precision.
  • Adjust how default slider range is set.
  • Include template render function in template context for users to use to recursively render templates.
  • Fix legacy string interpolation when multiple variables are used.
  • Include slider context in more templates.
  • Slider tooltip and icon use the same offset value that accounts for thumb width, and transform calculation is performed entirely in CSS.
  • Removed slider --tooltip-offset field, doesn't make sense for users to change.

TODO

  • Style rows and columns without card-mod #88.

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

NewReleases is sending notifications on new releases.