Mushroom Cards Card Mod Styling/Config Guide

Is something missing from this? The actual state?

Think this works?

 "{{ 'ARMED HOME' if states('alarm_control_panel.the_bobak_s_alarm') == 'armed_home' or states('alarm_control_panel.the_bobak_s_alarm') == 'disarmed' else 'ARMED AWAY' }}";

My bad, copy and paste error…

content:"{{ 'ARMED HOME' if is_state(config.entity, 'armed_home') else 'ARMED AWAY'}}";

1 Like

All good! I actually got the above code to work. Everything works as it should now! Again, greatly appreciate your help!

Hi, I’m trying to resize the entity card icon, but it doesn’t work when I use an entity-icon, it just applies to the default mdc icon.

Also, I can’t find a way to apply changes to a specific chip. When I paste the code it just disappears in the UI when I click save, or gives me error in yaml mode.

type: horizontal-stack
cards:
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        tap_action:
          action: navigate
          navigation_path: /lovelace/device
        icon: mdi:bell-outline
        hold_action:
          action: none
        double_tap_action:
          action: none
        content: ""
      - type: entity
        entity: person.one
        content_info: none
        use_entity_picture: true
    alignment: end
    card_mod:
      style: |
        ha-card {
            margin-top: 22px;
          }
        mushroom-conditional-chip:nth-child(1):
          mushroom-template-chip$: |
            ha-state-icon {
              --chip-icon-size: 30px;
            }
        mushroom-entity-chip:nth-child(2)$: |
          ha-state-icon {
              --chip-icon-size: 30px;
          }
layout_options:
  grid_columns: full

Any ideas? Thanks

One way…

- type: entity
  entity: person.one
  content_info: none
  use_entity_picture: true
  card_mod:
     style: |
        .avatar {
            --avatar-size: 50px !important;
            }
1 Like

Thanks, but It doesn’t matter what card_mod code I paste, it gets removed when I click save.

What card mod version are you on?

If v3.5, install 3.4.4

1 Like

Oh wow, didn’t realise this was a bug. Downgrading fixed it, thank you!

I’m trying to add some custom styles to the hue rgb slider…however I can’t seem to access the mushroom-slider. What am I doing wrong?

type: custom:hue-like-light-card
entities:
  - light.hue_outdoor_pedestal_1
  - light.hue_outdoor_pedestal_2
  - light.hue_outdoor_spot_1
  - light.hue_outdoor_spot_2
  - light.hue_outdoor_spot_3
title: Pad achter
scenes: []
hueScreenBgColor: theme-color
offShadow: false
hueBorders: false
slider: mushroom
card_mod:
  style: 
   .: |
      ha-card div.tap-area {
        height: 80px !important;
        display: grid;
        grid-template-columns: 64px 1fr;
        grid-template-areas: "i n";
      }
      ha-card .text-area {
        margin: 0;
        display: flex;
        justify-self: start !important;
        grid-area: n;
        max-width: 100%;
        align-self: center;
        justify-self: center;
      }
      ha-card .text-area h2 {
        margin: 0 !important;
        font-size: 16px !important;
        font-weight: 400 !important;
        color: var(--gray800) !important;
      }
      ha-card .text-area .desc {
        font-size: 10px !important;
        font-weight: 400 !important;
        color: var(--gray800) !important;
      }
      ha-icon {
        display: flex;
        grid-area: i;
        height: 100%;
        width: 100%;
        max-width: 100%;
        max-height: 100%;
        align-self: center;
        justify-self: center;
        overflow: hidden;
        justify-content: center;
        align-items: center;
        position: relative !important;
        transform: none !important;
        left: 0 !important;
        top: 0 !important;
      }
      ha-switch {
        top: calc( 50% - 10px )!important;
      }
      .brightness-slider {
        position: absolute !important;
        top: 0;
        left: 0;
        margin: 0 !important;
        width: 100%;
        height: 80px;
      }
  hue-mushroom-slider-container$: |
    mushroom-slider {
      margin: 0 !important;
      width: 100% !important;
      position: absolute !important;
      top: 0;
      left: 0;
      height: 80px;
      --control-height: 80px !important;
      border-radius: 25px !important;
      overflow: hidden !important;
    }
hue-mushroom-slider-container$: 
  mushroom-slider$: |
    .slider {
      }
      
      

Is it possible to template the secondary information(4 hours ago) of a Select Card:

So it displays:

{{ states('sensor.iphone_tracker_area') ~ " - " ~ states('sensor.iphone_tracker_distance') ~ "m" }}``

Thanks :grin:

Hi I am struggeling with the styling of sliders, specific the background when inactive. Using the code above, it does not work… What am I doing wrong?

vertical-stack
cards:
  - type: custom:hue-like-light-card
    entity: light.woonkamer_lichten
    icon: mdi:sofa
    iconSize: big
    allowZero: true
    defaultColor: rgb(230,230,255)
    offColor: "#f2f2eb"
    hueScreenBgColor: theme-color
    offShadow: true
    hueBorders: true
    offClickAction: turn-on
    onClickAction: turn-off
    offHoldAction: hue-screen
    onHoldAction: hue-screen
  **- type: custom:mushroom-light-card**
**    entity: light.tuinrv**
**    fill_container: false**
**    use_light_color: true**
**    show_brightness_control: true**
**    show_color_temp_control: true**
**    show_color_control: true**
**    collapsible_controls: true**
**    icon: hue:bulb-br30-hung**
**    card_mod: null**
**    style: null**
**    mushroom-light-brightness-control$: |**
**      mushroom-slider {**
**        --bg-color-inactive: red !important;**
**          }**
  - type: custom:mushroom-light-card
    entity: light.serre_bloom
    icon: hue:bloom
    use_light_color: true
    show_brightness_control: true
    show_color_control: true
    show_color_temp_control: true
    collapsible_controls: true