Mushroom Cards - Build a beautiful dashboard easily 🍄 (Part 1)

Hi @dunner
How do I put this little icons on the cards?
I’m struggling to do that.

try this to remove the shadow:

      style: |
        ha-card {
          --chip-box-shadow: none;
          --chip-background: none;
          --chip-spacing: 0;
        }

Thanks, but won’t work because these are not chips. I mean the template card icon shadow that you can see if you zoom in.

do you mean the black-ish background around the icons under the room picture?

Nope, I mean the icon shadow/background of the template card.

mushroom-shape-icon { --shape-color: none !important; }
3 Likes

Nope, no luck.

strange. worked fine for me.


Nevermind, stupid-me had still an icon color to find it in the code details that of course prevented your code from functioning


Thanks for keeping up!

1 Like

No one? :roll_eyes: Hopefully just a small error from my side but can’t figure it out.

Probably just a limitation as in the normal button card.

Possible solution: put them in a switch group and toggle that entity.
Second option: put both in a script and call that via service and template.

1 Like

Do you mind sharing the code?
I’m trying to put the icons to show the entities states, like you did.

Which part? The room card?

You can’t toggle 2 entities like that. You need to create a group with those 2 entities in it then toggle the group.

As I already said in an intermediate posting, I later discovered that the best way for this fine tuning are Mushroom Themes. They allow you to control many aspects of the Mushroom Cards.

If you already have a theme in place, you can simply add the relevant mushroom variables to your theme and redefine their values. I.e. one of my own themes is call “AnJoWi Light Theme” and I simply added some mushroom vars to its YAML file:

AnJoWi Light Theme:
  # my existing theme settings
  primary-color: rgb(26, 115, 232)
  ...  
  # my new mushroom settings:
  mush-spacing: 5px  # was: 12px, i.e. space between Icon+Name and Slider
  mush-card-primary-font-size: 18px  # was: 14px
  mush-card-primary-font-weight: normal  # was: bold

And today I found that in conjunction with card-mod 3 of Thomas Lovén it is even possible to add these mushroom theme vars to individual mushroom cards!
To do this you must install card-mod 3 and then add the theme vars to your mushroom card’s yaml definition like this:

type: custom:mushroom-light-card
entity: light.kitchen
card_mod:
  style: |
    :host {
      height: 90px;
      --mush-icon-size: 52px;
      --mush-icon-symbol-size: 0.8em;
      --mush-spacing:5px;
    }

This is really VERY helpful.

3 Likes

Not to belittle your clues that you had lately but we’re doing this card-mod magic for individual cards for a couple of hundreds of posts in this thread.

You’re late to the party but of course still welcome. :wink:Beer’s in the fridge!

1 Like

Oh shit!
Why didn’t I find them when I was searching some weeks ago?
Thanks for the heads up and sorry for being boring. :grimacing:

We’ll laughing about this when we’re old.

Now buckle up and killerspeed to the where-the-heck-should-insert-this-code-snippet-this-time-hell-of-a-ride!

2 Likes

What is the source for your background images?

Found matching pictures for all my rooms there.

Not fully ready but pretty satisfied with the overall look between comic, color and freshness.

8 Likes