Mushroom Cards Card Mod Styling/Config Guide

--chip-height: 64px; is what you want to use. Something like this

image

type: custom:mushroom-chips-card
chips:
  - type: template
    icon: ''
    icon_color: ''
    picture: /local/shutter.png
    card_mod:
      style: |
        ha-card {
          justify-content: center;
          --chip-height: 64px;
          background:  none !important;
          border: none !important;
          
        }

Please post your code.

Add --card-primary-line-height: 26px !important;

Ensure the line height matches the font size

--card-primary-font-size: 46px !important;
--card-primary-line-height: 46px !important;

image

type: custom:mushroom-template-card
  card_mod:
    style:
      mushroom-state-info$: | 
        .container {
         --card-secondary-font-size: 16px;
         --card-primary-font-size: 46px;
         --card-primary-line-height: 46px !important;
         gap: 10px;
        }
      .: |
        ha-card {
         height: 90px !important;
        }        
        mushroom-shape-icon {
        --icon-size: 90px;
        }           
  primary: '{{ states(''sensor.time'') }} Uhr'
  secondary: >-
    {% set germanWeekdays = ["Montag",
    "Dienstag","Mittwoch","Donnerstag","Freitag","Samstag","Sonntag"] %}

    {{ germanWeekdays[now().weekday()] }}      {{ now().strftime('%d %b') }}
  multiline_secondary: false
  fill_container: true
1 Like

Thanks! That worked :slight_smile:

1 Like

Here is the code:

type: custom:stack-in-card
cards:
  - type: custom:mushroom-title-card
    title: Room1
    card_mod:
      style: |
        ha-card {
           --title-font-size: 1.2rem;
           --primary-text-color: gray;
           --title-spacing: 0rem;
           --title-padding: 0.5rem;
        } 
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: custom:mushroom-number-card
        entity: input_number.heating_u1_ch1_temperature
        display_mode: buttons
        layout: horizontal
        card_mod:
          style: |
            ha-card {
              border-width: 0px;    
              --control-width: 130px;
            }   
            mushroom-state-info {
               
               text-align: start;
               width: fit-content;
            }   

    card_mod:
      style: |
        ha-card {
          border-width: 1px;        
          border-radius: 10px;
          box-shadow: none;
          height: 68px;
          }
          
         
card_mod:
  style: |
    ha-card {
      padding: 10px;
      border-width: 1px; 
      background: rgba(var(--rgb-primary-text-color), 0.01);
    }

now where is that Tile guide, I cant find it and I have a very pressing question :wink:

suppose its safe to post here too, because Mushroom also uses more-info like anything in HA, especially this Tile.

it was not, sorry, moved over here

Your code doesnā€™t really match your pic, but this example may help youā€¦

yoursā€¦

after editsā€¦

type: custom:stack-in-card
cards:
  - type: custom:mushroom-title-card
    title: Room1
    card_mod:
      style: |
        ha-card {
           --title-font-size: 1.2rem;
           --primary-text-color: gray;
           --title-spacing: 0rem;
           --title-padding: 0.5rem;
        } 
  - type: custom:stack-in-card
    mode: vertical
    cards:
      - type: custom:mushroom-number-card
        entity: input_number.test_level_1
        display_mode: buttons
        layout: horizontal
        card_mod:
         style:
           mushroom-state-info$: |
            .container {
            flex-direction: row !important;
            align-items: baseline;
              }
            .primary {
            position: relative;
            flex-shrink:2;
            flex-grow: 2;
            white-space: normal !important;
                     }
    card_mod:
      style: |
        ha-card {
          border-width: 1px;        
          border-radius: 10px;
          box-shadow: none;
          height: 68px;
          }
          
         
card_mod:
  style: |
    ha-card {
      padding: 10px;
      border-width: 1px; 
      background: rgba(var(--rgb-primary-text-color), 0.01);
    }

Iā€™d review this guide and post here if you need assistance. Best to keep this thread Mushroom related. :mushroom:

yep, I do believe I crossed a line rereading it nowā€¦ sorry.
do you have the link for the Tile guide (I truly cant find it), so I can move it there.

hmm, thats not what I ws trying to reach, aware of that one (I was thereā€¦).

No, I meant the one from Dimitri, didnt he write that?

This?

I havent had time to finish it just yet. Ive been very busy at work recently. Hence why ive also been a bit absent with replying to people.

1 Like

@dimitri.landerloos may have more info. I use his Mushroom guide and for the most part Mushroom is based off the tile card, but Iā€™m sure you know that based off your profile #s and time hereā€¦

Textcolor in the template crad stopped working for me since a few weeks. Was white and turned into black. Any idea?

My code:

      - type: custom:mushroom-template-card
        primary: >-
          {% set monat = ["Januar", "Februar", "MƤrz", "April", "Mai", "Juni",
          "Juli", "August", "September", "Oktober", "November", "Dezember"] %}

          {% set monat =
          monat[as_timestamp(states('sensor.google_photos_familie_creation_timestamp'))|
          timestamp_custom('%m')| int -1] %}

          {{ monat ~ ' ' ~
          as_timestamp(states('sensor.google_photos_familie_creation_timestamp'))|
          timestamp_custom('%Y') }}
        card_mod:
          style:
            mushroom-state-info$: |
              .container {
                --primary-text-color: white;
                text-shadow: 1px 1px 3px black
              }
            .: |
              ha-card {
                --card-primary-font-size: 16px;
                --card-primary-font-weight: normal;
                background: none;
                border: none;
              }

This was working but changedā€¦

Thanky you, a lot, for helping!

take a look here:

Ive been quite busy so havent had to the time to make the updates yet.

Thank you!!

updated it, as with my current install of HA 2023.4 dev, these stopped working. Maybe even before, but I hadnā€™t noticed :wink:

check Style Tile: more-info - #3 by Mariusthvdb

Tile Fan nicely colored and animated according to speed and state

Hello all,

Iā€™m using the

type: custom:mushroom-chips-card

On a card in the dashboard i use this code to change the icon based on severall entities states.:

        variables:
          t2: switch.portao_garagem_portao_fechado
          t3: switch.portao_garagem_portao_aberto
        icon: |
          [[[
            var t2 = states[variables.t2].state;
            var t3 = states[variables.t3].state;
            if (t2 == 'on' && t3 == 'off') return 'mdi:garage-variant-lock';
            if (t2 == 'off' && t3 == 'on') return 'mdi:garage-open-variant';
            if (t2 == 'off' && t3 == 'off') return 'mdi:garage-alert-variant';
            return 'mdi:help';
          ]]]
        styles:
          icon:
            - color: |
                [[[
                  var t2 = states[variables.t2].state;
                  var t3 = states[variables.t3].state;
                  if (t2 == 'on' && t3 == 'off') return 'rgb(50, 205, 50)';
                  return 'rgb(205, 50, 50)';
                ]]]
            - animation: |
                [[[
                  var t2 = states[variables.t2].state;
                  var t3 = states[variables.t3].state;
                  if (t2 == 'off' && t3 == 'off') return 'blink 1s ease infinite'
                  return 'none';
                ]]]

How can i do it on the type: custom:mushroom-chips-card, and for cover entities for value above 2?

Basically i whant that the icon is shutter closed if all shutter at home are closed, or shutter open if any of the shutter are open.

Thanks

You can do something like this with your entities of course

type: custom:mushroom-chips-card
chips:
  - type: template
    icon: mdi:mushroom
    primary: Fan
    icon_color: |
      {% set k =  states('sensor.basement_door_battery')| int (0) %}
      {% set d = states('switch.server_fan') %} 
      {% if (k >= 20 and d == 'off') %}
       red
      {% elif (d  == 'off')  %} yellow
      {% else %}
       grey 
      {% endif %}