Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 107807

Resize title font on custom:vertical-stack-in-card using card_mod

$
0
0

I resize all my card titles because the default is way too big IMO.
This is what they look like:

However, I ran into issues when needing to stack entities and history-graph cards together as the card_mod style no longer works. After tons of searching I found the variable that allowed me to downsize the font of the title but I am stuck with a huge space between the title and the section (line).

Does anyone know how to do this properly?

The code I usually use is:

type: entities
card_mod:
  style: |
    .card-header {
      font-size: 18px;
      padding: 2px 15px 2px 15px
    }
entities:
  - type: section

This is what the stack that has an issue looks like:

This is the code for the stack shown above:

type: custom:vertical-stack-in-card
title: Grow Light & Fan
card_mod:
  style: |
    ha-card {
      --ha-card-header-font-size: 18px !important;
    }
cards:
  - type: entities
    show_header_toggle: false
    state_color: true
    entities:
      - type: section
      - type: custom:multiple-entity-row
        entity: input_boolean.grow_light
        toggle: true
        show_state: true
        entities:
          - entity: switch.top_grow_light
            name: Top
          - entity: switch.bottom_grow_light
            name: Bottom
        state_color: true
      - entity: input_select.grow_light_selection
      - entity: input_boolean.grow_light_schedule
        name: Grow Light Schedule
      - entity: input_datetime.grow_light_on_time
        name: "Turn on daily at:"
      - entity: input_datetime.grow_light_off_time
        name: "Turn off daily at:"
      - type: divider
      - entity: input_boolean.grow_fan
      - entity: switch.grow_fan_outlet
        type: simple-entity
        tap_action: none
        hold_action: none
        state_color: true
      - entity: input_boolean.grow_fan_schedule
        name: Grow Fan Schedule
        state_color: true
      - entity: input_datetime.grow_fan_on_time
        name: "Turn on daily at:"
      - entity: input_datetime.grow_fan_off_time
        name: "Turn off daily at:"
      - entity: input_button.sync_grow_schedules
      - input_boolean.grow_fan_on_off_cycle
      - entity: timer.grow_fan_timer
        type: custom:timer-bar-card
        name: Grow Fan Cycle
        bar_background: gray
        bar_radius: 5px
        state_color: true
        invert: false
      - entity: input_select.grow_fan_cycle_on
        name: Cycle On Time
      - entity: input_select.grow_fan_cycle_off
        name: Cycle Off Time
  - type: history-graph
    entities:
      - entity: switch.grow_fan_outlet
        name: Grow Fan
    hours_to_show: 24

4 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 107807


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>