Mushroom Cards - Build a beautiful dashboard easily šŸ„ (Part 1)

Great thanks for the tip with the size - Iā€™ll give that a go and see if they can be made a little more readable :grin:

I have another question. I would like to use an entity picture on a template card ā€¦ is this possible?

1 Like

EDIT: Nevermind I figured it out. Hereā€™s the code if anyone else runs into the same issue.

        card_mod:
          style:
            div:
              mushroom-template-chip$:
                mushroom-chip: |
                  ha-icon {
                    animation: rotation 1s linear infinite;
                  }
                  @keyframes rotation {
                    0% {
                      transform: rotate(0deg);
                    }
                    100% {
                      transform: rotate(360deg);
                    }
                  }
            .: |
              :host {
                --ha-card-background: rgba(var(--rgb-primary-text-color), 0.025);
              }

Anyone know how to combine these two sets of code into one style tag? No matter what I try itā€™s one or the other that works.

        card_mod:
          style: |
            :host {
              --ha-card-background: rgba(var(--rgb-primary-text-color), 0.025);
            }



        style:
          div:
            mushroom-template-chip$:
              mushroom-chip: |
                ha-icon {
                  animation: rotation 1s linear infinite;
                }
                @keyframes rotation {
                  0% {
                    transform: rotate(0deg);
                  }
                  100% {
                    transform: rotate(360deg);
                  }
                }
1 Like

Andā€¦ Mushroom 2.0.0 is released ! :mushroom:

This release lets you choose primary and secondary info from all cards. You can also use entity picture in all cards (even in template card !). :rocket:
There are also some improvements to increase slider/controls space when the primary, secondary info and/or icon are hidden.

More info in the release note : Release v2.0.0 Ā· piitaya/lovelace-mushroom Ā· GitHub.

19 Likes

I have been eagerly awaiting this to jump onboard as I have a lot of thermostatsā€¦ Is it still being worked on or should we fall back on one of the other existing ones ?

Hi, Please make Room Card

image

16 Likes

Hi everony, how i make bigger card?, thx.

image

Enable the ā€œFill containerā€ option.

This is how I was able to able to do it.

        card_mod:
          style:
            div:
              mushroom-conditional-chip:nth-child(3) mushroom-template-chip:
                $: |
                  mushroom-chip ha-icon {
                      animation: rotation 1s linear infinite;
                    }
                    @keyframes rotation {
                      0% {
                        transform: rotate(0deg);
                      }
                      100% {
                        transform: rotate(360deg);
                      }
                    }
            .: |
              :host {
                --ha-card-background: rgba(var(--rgb-primary-text-color), 0.025);
              }
              ha-card {
                --chip-spacing: 2px;
              }
1 Like

Hey,
how I can change the default color blue to yellow on the mushroom cover card, when the cover is open?

Any one have any idea why the styles arent applying for me ? (dont have external sensor atm)

But the padding is all out and i cant see any mention of needing any other cards with mushroom

1 Like

Exactly what I was looking for. Only one minor question, is there a way I can make the the tap_action work for the whole card? Seems to be only working when I tap on the title, in this example when I tap the word bathroom.

From what Iā€™ve gathered it seems to be because using ā€œtopā€ creates like a hidden container of some sort to the left over the top of the rest of the card.

How does one add a person picture to a template card?
I have this that greets me:

{% set time = now().hour %}
{% if (time >= 18) %}
  Good Evening, {{user}}!
{% elif (time >= 12) %}
  Good Afternoon, {{user}}!
{% elif (time >= 5) %}
  Good Morning, {{user}}!
{% else %}
  Hello, {{user}}!
{% endif %}

I donā€™t understand what Iā€™m missing. I opened up a Brand New template card and I copied in your code exactly the way it is and everything works but it gives an error when it comes to the badge icon. Is there something else I need installs for badges to work?

What error is it? Could you send a screenshot?

I havenā€™t used theme variables for anything yet, so Iā€™m a bit lost. How can I use the variables in the template cards?
Hereā€™s an example of a template card I have:

icon_color: |-
  {% if is_state('input_boolean.example_mode', 'on') %}
    red
  {% else %}
    #bdbdbd
  {% endif %}

I would like to use the theme variables like mush-rgb-red and mush-rgb-disabled. More generally, I am trying to solve the issue explained in Github Issue #196. Basically, Iā€™m trying to match the ā€œdisabledā€ color of a template card to the one of a entity card, on both light and dark mushroom themes. Does anyone actually have a working config?

Is there a way to set a variable template wide and use it in multiple fields afterwards, eg both primary and secondary fields?

There is a specific ā€˜disabledā€™ color for this purpose. Light theme it is #bdbdbd, while dark theme it is #6f6f6f.

1 Like

Can we do that with battery card you shared ?

What are you wanting to do?