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

New to home assistant and loving these cards. Is it possible to use a title card to display the time and date?

hope there will be a proper room/area card like yours in the future.

You can use a template in the Title card.
something like:

The time is {{ states('sensor.date_time') }}
4 Likes

Thanks! Have you found a way to hide the box of the non-chip card in the stack-in by any chance? It doesnā€™t look too bad in dark mode, but it looks a little strange in light mode.

Which card do you use for the history? Looks nice!

Unfortunately not, I use the mushroom theme that hide the border quite a bit.
Maybe with css is possible, but I donā€™t want to go that route

Can I get the template-card to use light rgb as icon-color? It seems as if I use any kind of rgb with an IF it does not work. Even tried {{ state_attr("light.bathroom", "rgb_color")|regex_replace(find="[()]", replace='') }}

I had this same issue and created an github issue some time ago.
Today I found some time to make a fix in the code and create a Pull Request.
Hope this also solves it for you.

You can do this if you have card mod installed.

type: custom:stack-in-card
mode: vertical
cards:
  - type: custom:mushroom-template-card
    primary: Hello, {{user}}
    secondary: How are you?
    icon: mdi:home
    card_mod: null
    style: |
      ha-card {
        box-shadow: 0px 0px;
      }
  - type: custom:mushroom-chips-card
    chips:
      - type: entity
        entity: person.phil
        card_mod: null
        style: |
          ha-card {
              box-shadow: 0px 0px;
          }
      - type: entity
        entity: person.phil
        card_mod: null
        style: |
          ha-card {
              box-shadow: 0px 0px;
          }
5 Likes

Bram, Many thanks for the support. Will wait patientlyšŸ˜‰

Iā€™m overwhelmed of the possibilities these cards offer to me and what I learned about templating and conditional cards and stuff.

Thank you guys very much!

Butā€¦

My inner Monk does have a problem with the custom:mushroom-template-card. I use these on the first page of my dashboard instead of a simple custom:mushroom-light-card to customize stuff but I stumble over one small design problem.

  • If I use the custom:mushroom-light-card and choose the main light of that room as the entity and the Icon Color I want I get the correct icon color when the light is on and simply no icon color when the light is off. Right as I want it
    See the card ā€œKĆ¼cheā€ which is a custom:mushroom-light-card.

  • If I use the custom:mushroom-template-card an the same light entity and put in a template for the icon color I get the icon color I choose when light is on BUT when the light is off I got an ugly white icon.
    See custom:mushroom-template-card with ā€œKammerā€

tl:dr
Am I making something wrong or is it a card design bug/feature?

Both main lights are on:
image

Both main lights are off
image

Hereā€™s my code:

type: horizontal-stack
cards:
  - type: custom:mushroom-entity-card
    entity: light.kuche
    icon_color: amber
    layout: horizontal
    tap_action:
      action: navigate
      navigation_path: kuche
    name: KĆ¼che
    icon: ''
    secondary_info: none
    primary_info: name
    hold_action:
      action: toggle
  - type: custom:mushroom-template-card
    entity: light.decke_kammer
    secondary: " {% if is_state('vacuum.robby_rock', 'docked') %}\n            \n          {% elif is_state('vacuum.robby_rock', 'cleaning') %}\n            Roberto ist unterwegs\n          {% elif is_state('vacuum.robby_rock', 'returning') %}\n            Roberto fƤhrt nach Hause\n          {% elif is_state('vacuum.robby_rock', 'error') %}\n            Roberto steckt fest\n          {% elif is_state('vacuum.robby_rock', 'paused') %}\n            Roberto macht Pause\t\t\t\n          {% else %}\n            failed\n          {% endif %}\n\n\n\n\n"
    primary: Kammer
    tap_action:
      action: navigate
      navigation_path: kammer
    hold_action:
      action: toggle
    double_tap_action:
      action: none
    icon_color: |-
      {% if is_state('light.decke_kammer', 'on') %}
        amber
      {% else %}
         
      {% endif %}
    icon: mdi:food
    card_mod:
      style: |
        ha-card {
          --secondary-text-color:  {{ 'red' if is_state('vacuum.robby_rock', 'error') else '' }};;
        }

have you tried this?

    icon_color: |-
      {% if is_state('light.decke_kammer', 'on') %}
        amber
      {% else %}
         grey
      {% endif %}

[/quote]

The disabled color is not accessible for now. Iā€™m trying to add this support for entity and template but itā€™s not simple because of light/dark theme :sweat_smile:
I keep you updated :blush:

4 Likes

As I now know that I didnā€™t do something wrong and you even understood what my problem is I can wait as long as it takes you.

Thank you very much for the quick reply.

Tinkering now with more secondary informations template based. :slight_smile:

1 Like

Yes, I did. Just see Pauls answer. But thanks for trying to help me. :fist_right:

Thanks, without border is really clean

8 Likes

Try add this

1 Like

I experienced the same, it used to work in the past. Use this instead:


icon_color: |
  {%- if is_state(entity, 'on') %} 
  {{ '#%02x%02x%02x' % state_attr(entity, 'rgb_color') }}
  {%- else %} #b8b8b8
  {% endif %}

2 Likes

Yes! that is the one that I am using

Where did you get the graphic at the top of your ui? Love it!!