Nerwyn / android-tv-card

Universal Customizable TV Remote Card, with HA actions, super configurable touchpad, slider, haptics, and keyboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing title style

eyalmichon opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
When enabling title, it takes a big space to include it.

Describe the solution you'd like
To be able to control the height of this section and font size, etc, or even hide the title based on a state
I want this because I use a state to control showing the actual controls.

Note:
While writing this I actually figured that I could just use the following to do what I want:
title: >- iif(is_state(“media_player.tv”, “on”), “null” ,TV”)

The title does support templating (via ha-nunjucks, like everything else in this card), but the title itself is a Home Assistant card feature that I don't have control over style wise. To change it's style you'd have to use card-mod, like so:

card_mod:
  style:
    $: |
      .card-header {
        --ha-card-header-color: red;
        padding: 0px 12px !important;
      }

card-mod also supports templating (via Home Assistant's backend, so it's slower but more fully featured) so you can also include templates for changing color and size there.