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

what is the right way of adding these so they aren’t clobbered with subsequent mushroom updates? Is it just to fork the theme into my own custom theme file? If so, won’t that risk later missing updates in the main mushroom theme file?

1 Like

Dropped your custom yaml into my dashboard not expecting it to work given we don’t have the same entities, etc. However, I have found this a good way to get started using someone else’s card to them customize from there.

However, the display of the card is broken and I’m trying to figure out what it is… It’s not just the missing backgrounds (I obviously don’t have those) because the template code is showing in the frontend. Any ideas what’s wrong? I have the dependencies, including card mod installed afaik and other mushroom cards work.

That is absolutely right, as you said

we don’t have the same entities, etc.

The template is showing because you haven’t change the entity names in the yaml to use the ones you have. As soon as you do that, the values will appear and it will work except the pictures until you replace them.

Open the card up and change the yaml and you will be good to go, and just remove any template entities you dont need

Hi, all.
I need your help.
My code consist of 2 entities: climate.valvola_camera_da_letto and binary_sensor.finestra_camera

square: false
columns: 2
type: grid
cards:
  - type: custom:mushroom-climate-card
    entity: climate.valvola_camera_da_letto
    collapsible_controls: false
    show_temperature_control: true
    hvac_modes:
      - auto
    layout: null
    card_mod: null
    style: |
      ha-card {
        margin-right: -250px;
  - type: custom:mushroom-entity-card
    entity: binary_sensor.finestra_camera
    fill_container: false
    primary_info: none
    secondary_info: none
    layout: null
    card_mod: null
    style: |
      ha-card {
        margin-right: 170px;

I would like to move the window icon to the right.
Immagine 2023-02-13 092355

It’s possible?
Thanks in advance.

Hello
Looks great It’s my turn to design my cards and I would like to know how you did it with the light entities. Guess they are not chips but the normal icons, right?
Can you share the code? Would be cool.
Thanks.

The buttons in the photo are part of de default area cards.

Hi,

I’d like to use a title-card where I could toggle an entity when title_tap_action but I can’t get it work as I don’t know where to place the entity.
When I run the code below, it says no entity was given.

Could someone confirm it’s possible as I see the tap_action in the title card?

type: custom:mushroom-title-card
title: Etage
title_tap_action:
  action: toggle
  entity: light.etage


Anyone who knows how to make the input for the select card smaller? Want to change the width.

I’m trying to get a more compact set of cards to ideally have all my rooms on the main dashboard to reduce the amount of dashboard/view flipping I have to do.

As part of this, I’m trying to get a card working based on some previous examples and am getting close:
image

this is the yaml:

  - type: custom:vertical-stack-in-card
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:mushroom-template-card
            primary: ''
            secondary: ''
            icon: mdi:silverware-fork-knife
            icon_color: blue
          - type: custom:mushroom-template-card
            icon: ''
            icon_color: ''
            primary: Kitchen
            secondary: >-
              {{
              states('sensor.kitchen_sink_leak_sensor_temperature')|float|round(0)
              + 3 }} {{
              state_attr('sensor.kitchen_sink_leak_sensor_temperature',
              "unit_of_measurement") }}
            layout: horizontal
            fill_container: false
      - type: custom:mushroom-chips-card
        chips:
          - type: template
            entity: switch.decent_espresso
            icon: mdi:coffee-maker
            icon_color: |-
              {% if states(entity) == 'on' %}
              amber
              {% else %}
              disabled
              {% endif %}
            tap_action:
              action: toggle
          - type: template
            entity: switch.decent_espresso
            icon: mdi:coffee-maker
            icon_color: |-
              {% if states(entity) == 'on' %}
              amber
              {% else %}
              disabled
              {% endif %}
            tap_action:
              action: toggle
        alignment: left
        card_mod:
          style: |
            ha-card {
              margin: 10px 24px 10px 10px;
              --chip-background: 
                {% if states('switch.decent_espresso') == 'on' %} 
                rgba(var(--rgb-amber), 0.2);
                {% else %}
                rgba(var(--rgb-disabled), 0.15);
                {% endif %}
              --chip-box-shadow: none;
              --chip-border-radius: 25px;
              --chip-height: 42px;
              --chip-padding: 10px;
            }

What I’d love to do is get the room label and temp more left aligned like this:

image

I’m goign out of my mind figuring out what to change in the CSS. Any tips looking at the YAML i’ve provided above?

Hi there,

is there a easy way for custom:mushroom-chips-cardt o change the color of an icon depending on the temperature range?

e.g.

< 2°C , dark blue;
  2°C to 10°C, light blue
10°C  to 25°C  orange; 
>25°C red
cards:
  - type: custom:mushroom-chips-card
    chips:
      - type: menu
      - type: entity
        entity: sensor.1w_ds2438t
        icon_color: orange
      - type: entity
        entity: sensor.1w_ds2438h
        icon_color: indigo
       .......

Hi there,

I’ve seen a similar example to the YAML below, but mine does not appear to be working. Anyone have any idea? I have a Blink camera system and trying to use the Mushroom alarm card to arm/disarm based on current state.

Nothing happens when I tap.

      - type: horizontal-stack
        cards:
          - type: custom:mushroom-alarm-control-panel-card
            name: Blink
            entity: alarm_control_panel.blink_home
            tap_action:
              action: call-serivce
              service: >
                [[[
                  if (alarm_control_panel.blink_home == 'disarmed')
                    return 'alarm_control_panel.alarm_arm_away';
                  else
                    return 'alarm_control_palnel.alarm_disarm';
                ]]]
              service_data:
                entity_id: alarm_control_panel.blink_home

you would need to use a template chip

Something like this might provide you enough info to go in the right direction. Notice it’s a template card:

          - type: custom:mushroom-chips-card
            chips:
              - type: template
                content: >-
                  {{ states(entity) | float }} {{ state_attr(entity,
                  "unit_of_measurement") }}
                entity: sensor.house_main_temperature
                icon: mdi:thermometer
                tap_action:
                  action: more-info
                icon_color: |-
                  {% set state=states(entity)|float(0) %}
                  {% if state >= 75 %}
                  red
                  {% elif state >= 69 %}
                  orange
                  {% elif state < 69 %}
                  blue
                  {% else %}
                  grey
                  {% endif %}

Can this be done with the slider being just to the right instead of below?
e.g. how the light card layout can be set in horizontal?

image

Yes, like this:

type: custom:stack-in-card
mode: horizontal
cards:
  - type: custom:mushroom-template-card
    entity: input_number.rhys_pc_volume
    icon: |
      {% set vol_level = states(entity) | float %}
      {% if vol_level == 0 %}
        mdi:volume-mute
      {% elif vol_level > 0.66 %}
        mdi:volume-high
      {% elif vol_level < 0.33 %}
        mdi:volume-low
      {% else %}
        mdi:volume-medium
      {% endif %}
    icon_color: indigo
    primary: Volume
    secondary: |
      {{ ( states(entity) | float * 100 ) | round | int }}%
  - type: custom:my-slider
    entity: input_number.rhys_pc_volume
    radius: 12px
    height: 42px
    mainSliderColor: rgb(var(--mush-rgb-indigo))
    secondarySliderColor: rgba(var(--mush-rgb-indigo), 0.2)
    mainSliderColorOff: rgb(var(--mush-rgb-disabled))
    secondarySliderColorOff: rgba(var(--mush-rgb-disabled), 0.2)
    thumbHorizontalPadding: 0px
    thumbVerticalPadding: 0px
    thumbWidth: 0px
    card_mod:
      style: |
        ha-card {
          padding: 12px 12px 12px 6px;
          #--mush-rgb-disabled: 189,189,189;
          #--mush-rgb-indigo: 63, 81, 181;
        }
2 Likes

Looks like the mushroom-alarm-control-panel-card does not support the templating. Just wrote a script instead.

lias: Arm or Disarm Blink
sequence:
  - condition: state
    entity_id: alarm_control_panel.blink_home
    state: disarmed
  - service: alarm_control_panel.alarm_arm_away
    data: {}
    target:
      entity_id: alarm_control_panel.blink_home
mode: single
icon: mdi:camera

any chance of the code?

Yer check the replies I’ve posted it in there.

can you share your code

Hi all,

thanks for the very good exampe, that helps me!