Mushroom Cards Card Mod Styling/Config Guide

From my knowledge, you would have to stack cards

type: custom:vertical-stack-in-card
cards:
  - type: custom:mushroom-light-card
    entity: light.night_stand
    name: Lys Soveværelset
    use_light_color: true
    show_brightness_control: true
    show_color_control: true
    show_color_temp_control: true
    fill_container: false
    tap_action:
      action: more-info
    card_mod:
      style:
        mushroom-button:nth-child(3)$: |
          .button {
            width: 40px !important;
            height: 40px !important;
            margin: -50px -20px !important;
            position: absolute;
              }
        mushroom-button:nth-child(2)$: |
          .button {
            width: 40px !important;
            height: 40px !important;
            margin: -50px -10px !important;
            position: absolute;
              }
        mushroom-light-brightness-control$:
          mushroom-slider$: |
            .container {
              width: 130% !important;
              }
        mushroom-light-color-temp-control$:
          mushroom-slider$: |
            .container {
              width: 130% !important;
                   } 
        mushroom-light-color-control$:
          mushroom-slider$: |
            .container {
              width: 130% !important;
                   } 
  - type: custom:mushroom-template-card
    entity: light.night_stand
    icon: mdi:clock
    color: blue
    features_position: bottom
    card_mod:
      style: |
        ha-card {
         top: -110px;
         left: 280px;
         background: none;
         height: 0px !important;
          }
        ha-tile-icon {
         --tile-icon-border-radius: 11px;
          }
  - type: custom:mushroom-template-card
    entity: light.night_stand
    icon: mdi:phone
    color: red
    tap_action:
      action: toggle
    card_mod:
      style: |
        ha-card {
          background: none;
          height: 0px !important;
           }
        ha-tile-icon {
          --tile-icon-border-radius: 11px;
          top: -110px;
          left: 320px;
           }

How do I target the title_tap_action chevron icon for the Title card ? I want to get rid of it, but can’t find a way. I believe it’s --mdc-icon, or is it based on the Tile card variable?

Thanks

type: custom:mushroom-title-card
title: Hello, {{ user }} !
title_tap_action:
  action: perform-action
  perform_action: ""
card_mod:
  style: |
    .actionable ha-icon {
      display: none;
    }
1 Like

Thanks, but it’s not applying for some reason?

What code are you trying?

I tried my code and your example, but neither work.

Try :arrow_down:

card_mod:
  style: |
    ha-icon {
      display: none !important;
    }

This works as well…

card_mod:
  style: |
    .actionable ha-icon {
      display: none !important;
    }
1 Like

As per @LiQuid_cOOled, try adding ‘!important’. I keep forgetting that some Browsers treat same CSS specificity differently (i.e. which CSS wins). I find I have to add ‘important’ less than others, mainly those on Safari.

1 Like

@LiQuid_cOOled

Amazing. I’m gonna play around with that a bit. Thanks alot!

1 Like

I am using a climate card and when I run an script that enables/disables the HVAC the view goes from temp select to mode select. This is fine when it is turned off but when i turn it out it would be good to go to temp selection view.

Here is an example of the views:

Is there anyway to force it back to the first view after running my script?

Hello,
I’m contacting you because I’m having trouble applying a font size to my text.
Can you help me?

type: custom:mushroom-template-card
primary: Tarif électricité
secondary: >
  {% if is_state('binary_sensor.heures_creuses','on') %}
    Heures creuses
  {% else %}
    Heures pleines
  Prochaines heures creuses dans {{ states('sensor.prochaine_heure_creuse') }}
  {% endif %}
icon: >
  {% if is_state('binary_sensor.heures_creuses','on') %}
    mdi:leaf
  {% else %}
    mdi:flash
  {% endif %}
multiline_secondary: true
entity: binary_sensor.heures_creuses
color: >
  {% if is_state('binary_sensor.heures_creuses','on') %}
    #00b050
  {% else %}
    #4472c4
  {% endif %}
features_position: bottom
grid_options:
  columns: 12
  rows: auto
card_mod:
  style:
    mushroom-state-info$: |
      .container {
       --card-secondary-font-size: 200px;
       --card-primary-font-size: 200px;
      }

mushroom-state-info is no longer used in v5. It is now ha-tile-info. Also you don’t need to go to shadowRoot if using CSS vars as they pierce the shadow DOM.

So it is as simple as…

card_mod:
  style: |
    :host {
      --ha-tile-info-primary-font-size: 24px;
      --ha-tile-info-secondary-font-size: 16px;
    }

Thank you so much, it works perfectly :slight_smile:

1 Like

I’m probably stupid, but I use the mushroom alarm control card. I want if it’s diarmed a green icon, when armed_way , a red one… Can’t seem to find it. And my friend chatgpt doesn’t give me a correct solution. Anyone? pls

Something like this. Defining the alarm states matters!

type: custom:mushroom-alarm-control-panel-card
entity: alarm_control_panel.home_alarm
card_mod:
  style:
    mushroom-shape-icon$: |
      .shape {
       --border-state: {% if is_state(config.entity,'disarmed') %} red {% else %} lime {% endif %};
       border: 1px solid var(--border-state);
       --shape-color: black;
        }
    .: |
      ha-state-icon {
       color: var(--border-state);
      }
1 Like

yes thanks!

Is it possible to have a Mushroom Lighting card styled like this:
Bedroom [ O ] [ Off | On ]

That is, label, brightness slider, off button, on button?

Hi,

How did you get the badge into the climate card? I’ve been looking for this and everything I read says it’s not possible.

How do I change the badge icon color, this code doesn’t work… :confused:

card_mod:
  style: |
    mushroom-badge-icon {
      --icon-color: orange;
    }

Hello, how can i move secondary info a little bit to he right?