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

I’m not sure if someone has made this by now, but I saw several people were looking to have a room card in their mushroom dashboard as can be done with the ‘Minimalist’ UI. It’s not entirely foolproof and may need polishing or might be be conflicting some basic CSS rules, I’m not a web developer but used card-mod to get it at least looking like what I wanted.

Maybe it can be a useful start for someone looking for something like this.

This is the code used for the left living room card:

type: custom:stack-in-card
mode: horizontal
cards:
  - type: vertical-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: sensor.badkamer_temperature
        name: Living Room
        primary_info: name
        secondary_info: state
        icon: ''
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                display: none !important;
              }
            .: |
              ha-card {
                border: 0px;
                padding-left: 2px;
                padding-top: 10px;
                width: 500px;
              }
      - type: custom:mushroom-entity-card
        entity: scene.food
        layout: horizontal
        icon: mdi:sofa
        icon_color: blue
        primary_info: none
        secondary_info: none
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                --icon-size: 150px;
              }
            .: |
              ha-card {
                border: 0px;
                margin-left: -30px;
                margin-bottom: -30px;
              }
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        entity: scene.food
        tap_action:
          action: perform-action
          perform_action: scene.turn_on
          target:
            entity_id: scene.food
          data:
            transition: 5
        hold_action:
          action: none
        double_tap_action:
          action: none
        icon: mdi:silverware-fork-knife
        card_mod:
          style: |
            ha-card {
              --chip-background: rgba(255,165,0,0.1) !important;
              --color: orange;
              justify-content: center;
              height: 44px !important;
              width: 44px !important;
              border: 0 !important;
              box-shadow: none !important;
              border-radius: 22px !important;
            }
      - type: template
        icon: mdi:television
        tap_action:
          action: perform-action
          perform_action: script.tv
          target: {}
        hold_action:
          action: none
        double_tap_action:
          action: none
        card_mod:
          style: |
            ha-card {
              --chip-background: rgba(37,57,38,255);
              --color: rgba(76,175,80,255);
              justify-content: center;
              height: 44px !important;
              width: 44px !important;
              border: 0 !important;
              box-shadow: none !important;
              border-radius: 22px !important;
            }
      - type: template
        icon: mdi:sleep
        tap_action:
          action: perform-action
          perform_action: script.bedtime
          target: {}
        hold_action:
          action: none
        double_tap_action:
          action: none
        card_mod:
          style: |
            ha-card {
              justify-content: center;
              height: 44px !important;
              width: 44px !important;
              border: 0 !important;
              box-shadow: none !important;
              border-radius: 22px !important;
              --chip-background: rgba(51,43,62,255);
              --color: rgba(146,107,199,255);
            }
    card_mod:
      style: |
        .chip-container {
          flex-flow: column wrap-reverse !important;
          display: flex !important;
          --chip-spacing: 8px;
          margin: 12px;
        }
        .: |
        .container {
          align: end;
        }
card_mod:
  style: |
    ha-card {
      max-width: 100%;
      min-width: 50%;
    }

For those interested, I’m using it on an NS Panel Pro looking like this:

7 Likes

Hey is it maybe possible to add a plus and minus button to the fan card?

              - type: custom:mushroom-entity-card
                entity: sensor.date_templated
                name: " "
                icon: none
                icon_color: white
                card_mod:
                  style: 
                    mushroom-state-info$: |
                      .container {
                      --card-secondary-font-weight: bold;    
                      }   
                    .: |                     
                      ha-state-icon {
                        --icon-symbol-size: 0px;
                      }

How can I remove the icon background, and also the space provided for the icon ?
I want my entity centered over the card withoud an icon…

Nice! Pretty much what I am looking for.

One question: How can I reduce the space between the icon and the temperature? Currently, the card is taking up a bit too much space for me.

Last time i shared a dash on here aas about a year ago. Ive since moved and changed a lot around - first im now using ipad mini 4s instead of nest hubs, and im using them on iport launchport dock bases (the loung room one is cut into my coffee table).

Mushroom continues to be the overarching theme, but i am running lots of other custom HACS and many of the cards i have made are modified version of examples from these hacs and presumably made by their creators (including bubble cards, android tv remote card, sonos card and universal remote card). Insprarion was also taken from many random cards ive seen people post in this very thread (sorry for not naming anyone specifically, i jist cant really remember as its been a many months slow side project).

Im incredibly happy finally with my take on a mushroom edit of the famous sonos card.

The iframe casts directly to my tv and the universal remote bar below it controls it amazingly well, even better than the real thing.

Where i want more options ive got bubble popup cards hidden under buttons - like speaker volumes and groups, media, a full googletv remote, and the full normal sonos card too.

The main reason for switching to ipad is so now i can play music video media in the iframe and airplay to sonos, and this really works well.

There are so few light and other entity controls because ive set them all up for motion, time of day, day of week, and geofence - thanks to browser mod the ipads turn their screen off till you enter the room and are turned as part of my automations that turn on and off the lights and sonos as you enter and exit the room.

I will share my yaml with you all, but as i have said in the past, please be kind and try not to judge it too harshly, as i really dont know how to write any code and ive created it with messy and clunky brute force (there will be a lot of stuff that shouldn’t be in there or could have been done better). I hope some of you might instead do as i have done and use this as a guide to half mod and mess around with to create something special and bespoke for you.


1000005653


5 Likes

The iframe and remote

type: custom:stack-in-card
cards:
  - type: iframe
    url: Http://10.0.0.x:8096
    aspect_ratio: 1x0.615
  - type: custom:android-tv-card
    custom_actions:
      - type: button
        name: remote
        icon: mdi:remote
        tap_action:
          action: navigate
          navigation_path: "#remote"
      - type: touchpad
        name: touchpad
        tap_action:
          action: key
          key: DPAD_CENTER
        up:
          tap_action:
            action: key
            key: DPAD_UP
          hold_action:
            action: repeat
          type: button
        down:
          tap_action:
            action: key
            key: DPAD_DOWN
          hold_action:
            action: repeat
          type: button
        left:
          tap_action:
            action: key
            key: DPAD_LEFT
          hold_action:
            action: repeat
          type: button
        right:
          tap_action:
            action: key
            key: DPAD_RIGHT
          hold_action:
            action: repeat
          type: button
        styles: |-
          toucharea {
            height: 85px;
            width: 170px;
            background-color: rgba(0,0,0,0.5);

          }
        autofill_entity_id: true
    keyboard_id: remote.android_tv_10_0_0_105
    media_player_id: media_player.master_bedroom_tv_2
    rows:
      - - - power
        - - keyboard
        - - home
        - - back
        - - touchpad
        - - jellyfin
        - - plex
        - - netflix
        - - remote
    autofill_entity_id: true
    styles: |-
      :host {
        --size: 35px;
      }
    remote_id: remote.master_bedroom_tv
    card_mod:
      style:
        mushroom-state-info$: |
          .container {
          align-items: end;
          }
        .: |
          ha-card {
            margin-top: -20px;
            margin-bottom: -10px;
            padding-left: 10px;
            padding-right: 10px;
          }
view_layout:
  grid-area: main2
card_mod:
  style: |
    ha-card:before {
      transform: translate3d(0,0,0);
      -webkit-transform: translate3d(0,0,0);
      content: "";
      position: absolute;
      height: 100%;
      width: 100%;

      

      filter: blur(10px) saturate(20%) opacity(20%);
      background-size: 100% 100%;
    }
    ha-card {
      transform: translate3d(0,0,0);
      -webkit-transform: translate3d(0,0,0);
    }

The climate control

type: custom:stack-in-card
cards:
  - type: custom:mini-graph-card
    entities:
      - entity: sensor.humidity_53
        name: Inside Temperature
        color: "#4caf50"
      - entity: sensor.the_breville_airactive_3dtm_4
        name: Outside Temperature
        color: "#2196f3"
        y_axis: secondary
    hours_to_show: 24
    line_width: 3
    font_size: 50
    animate: true
    show:
      name: false
      icon: false
      state: false
      legend: false
      fill: fade
    card_mod:
      style: |
        ha-card {
          margin-top: 15px !important;
          margin-bottom: -25px !important;
          filter: blur(2px) opacity(90%);
          }
  - type: custom:mushroom-chips-card
    chips:
      - type: template
        content: "{{state_attr(entity, 'current_temperature')}} °C"
        entity: climate.thermostat
        icon: mdi:home-thermometer
        icon_color: green
      - type: template
        double_tap_action:
          action: none
        content: "{{ states(entity) }}% "
        entity: sensor.humidity_32
        icon: mdi:water
        icon_color: blue
        tap_action:
          action: none
        hold_action:
          action: none
    card_mod:
      style: |
        ha-card {
          margin-top: -63px !important;
          padding-bottom: 0px !important;
          --chip-background: none;
                    
        }
    alignment: justify
  - type: custom:simple-thermostat
    entity: climate.thermostat
    header:
      name: false
      icon: false
    decimals: "0"
    fallback: "Off"
    hide:
      temperature: true
      state: true
    layout:
      mode:
        names: false
        icons: true
        headings: false
      step: row
    step_size: "1"
    control:
      hvac:
        "off": true
        heat: true
        cool: true
        fan: true
      fan: true
    card_mod:
      style: |
        ha-card {
          margin-top: -67px !important;
          margin-bottom: -6px !important;
          margin-left: -5px;
          margin-right: -5px;
          --st-font-size-xl: 34px;
          --st-font-size-m: 20px;
          --st-font-size-title: 20px;
          --st-font-size-sensors: 30px;
          --st-spacing: 2px;
        }
        ha-card .thermostat-trigger { 
          color: #9e9e9e;
        }
view_layout:
  grid-area: air
card_mod:
  style: |
    ha-card {
      margin-left: -5px !important;

      }

The media player

type: custom:stack-in-card
view_layout:
  grid-area: sidebar
cards:
  - type: vertical-stack
    cards:
      - type: custom:mushroom-media-player-card
        entity: media_player.club
        icon: phu:sonos
        name: Club
        secondary_info: none
        primary_info: none
        use_media_info: false
        icon_type: icon
        layout: horizontal
        tap_action:
          action: navigate
          navigation_path: "#media2"
        show_name: false
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                 padding-right: 0px;
                 padding-left: 0px;
                 padding-top: 0px;
                 border-radius: 0px !important;
                 
                 --icon-symbol-size: 90px;
                 --icon-size: 0px;
               }
            .: |
              ha-card {
                  padding-left: 50px;
                   padding-top: 22px;
                   margin-bottom: px;
                   margin-top: -5px;
                   
                   
                }
                
      - type: custom:mini-media-player
        entity: media_player.club
        artwork: none
        icon: mdi:decimal
        hide:
          volume: true
          mute: true
          power: true
          prev: true
          info: true
          next: true
          name: true
          source: false
          icon: true
          progress: true
          play_pause: true
        group: true
        card_mod:
          style:
            .: |
              ha-card {
                   margin-right: 8px;
                   padding-top: 5px;
                   margin-left: 100px;
                   margin-top: -45px;
                   margin-bottom: 0px;
                   padding-bottom: 0px;
                   
                   
                }
                
      - type: custom:stack-in-card
        cards:
          - type: custom:mushroom-media-player-card
            entity: media_player.club
            icon: phu:sonos
            name: Club
            use_media_info: true
            icon_type: none
            layout: vertical
            fill_container: false
            card_mod:
              style:
                .: |
                  ha-card {
                     margin-bottom: -10px;
                     padding-left: 10px;
                     padding-right: 10px;
                     margin-top: 15px;
                  }
          - type: custom:android-tv-card
            media_player_id: media_player.club
            rows:
              - - touchpad
              - - media_position
            custom_actions:
              - type: slider
                name: media_position
                value_attribute: media_position
                range:
                  - 0
                  - "{{ state_attr(config.entity, \"media_duration\") }}"
                tap_action:
                  action: perform-action
                  perform_action: media_player.media_seek
                  data:
                    seek_position: "{{ value }}"
                step: 1
                styles: |-
                  :host {
                    --thumb-width: 5px;
                    --tooltip-label: '{{ (value / 60) | int }}:{{ 0 if (value - 60*((value / 60) | int)) < 10 else "" }}{{ (value - 60*((value / 60) | int)) | int }}';
                    height: 10px;
                    border-radius: 0% 0% 0;
                    top: 2px
                  }
                  .label {
                    filter: invert(1);
                    mix-blend-mode: difference;
                  }
                label: |2-
                    {% set minutes = (value / 60) | int %} {% set seconds = (value - 60 * minutes)
                    | int %} {{ minutes }}:{{ 0 if seconds < 10 else "" }}{{ seconds | int }}/{{ (state_attr(config.entity, "media_duration") / 60) | int }}:{{ 0 if
                    (state_attr(config.entity, "media_duration") - 60*((state_attr(config.entity,
                    "media_duration") / 60) | int)) < 10 else "" }}{{ (state_attr(config.entity,
                    "media_duration") - 60*((state_attr(config.entity, "media_duration") / 60) |
                    int)) | int }}
              - type: touchpad
                name: touchpad
                tap_action:
                  action: perform-action
                  perform_action: media_player.media_play_pause
                up:
                  tap_action:
                    action: none
                  hold_action:
                    action: none
                  type: button
                down:
                  tap_action:
                    action: none
                  hold_action:
                    action: none
                  type: button
                left:
                  tap_action:
                    action: perform-action
                    perform_action: media_player.media_next_track
                  hold_action:
                    action: none
                  icon: mdi:skip-previous
                  type: button
                  styles: |-
                    :host {
                      padding: 0;
                      filter: invert(1);
                      background-blend-mode: difference;
                      margin: 0;
                      --size: 60px;
                      --icon-color: rgb(0, 0, 0, 0.5)
                    }
                right:
                  tap_action:
                    action: perform-action
                    perform_action: media_player.media_previous_track
                  hold_action:
                    action: none
                  icon: mdi:skip-next
                  type: button
                  styles: |-
                    :host {
                      padding: 0;
                      margin: 0;
                      filter: invert(1);
                      background-blend-mode: difference;
                      margin: 0;
                      --size: 60px;
                      --icon-color: rgb(0, 0, 0, 0.5)
                    }
                styles: |-
                  toucharea {
                    background-color: rgb(0, 0, 0, 0.9);
                    background-image: url("http://homeassistant.local:8123{{ state_attr(config.entity, 'entity_picture') }}");
                    background-repeat: no-repeat;
                    background-size: cover;
                    background-position: center;
                    background-blend-mode: difference;
                    height: 250px;
                    width: 200px;
                    border-radius: 0% 0% 0;
                    --background-blend-mode: multiply;
                  }
                hold_action:
                  action: more-info
                icon: mdi:play-pause
          - type: custom:mushroom-media-player-card
            entity: media_player.club
            icon: phu:sonos
            name: Club
            use_media_info: false
            icon_type: none
            layout: horizontal
            secondary_info: none
            primary_info: none
            volume_controls:
              - volume_set
              - volume_mute
            card_mod:
              style:
                mushroom-state-info$: |
                  .container {
                    align-items: end;
                  }
                .: |
                  ha-card {
                     margin-top: -10px;
                     padding-bottom: 5px;                   padding-left: 10px;
                     padding-right: 15px;
                  }
        card_mod:
          style: |
            ha-card:before {
              transform: translate3d(0,0,0);
              -webkit-transform: translate3d(0,0,0);
              content: "";
              position: absolute;
              height: 100%;
width: 100%;

              background: url('/local/idle_art.png') center no-repeat;
             {% if not is_state('media_player.currently_playing', 'idle') %}
               background: url( '{{ state_attr('media_player.club', "entity_picture") }}' ) center no-repeat;
              {% endif %};
              filter: blur(100px) saturate(300%);
              background-size: 100% 100%;
            }
            ha-card {
              transform: translate3d(0,0,0);
              -webkit-transform: translate3d(0,0,0);
            }
  - type: horizontal-stack
    cards:
      - type: horizontal-stack
        cards: []
      - type: custom:mushroom-media-player-card
        entity: media_player.club
        icon: mdi:album
        use_media_info: false
        icon_type: icon
        secondary_info: name
        primary_info: none
        tap_action:
          action: navigate
          navigation_path: "#media"
        name: Media
        layout: horizontal
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                 padding-right: 0px;
                 padding-left: 0px;
                 padding-top: 0px;
                 border-radius: 0px !important;
                 
                 --icon-symbol-size: 15px;
                 --icon-size: 0px;
               }
            .: |
              ha-card {

                 margin-left: 0px;
                 margin-top: 2px;
                 padding-left: 10px;
                 padding-bottom: 5px;
               }
               
      - type: custom:mushroom-media-player-card
        entity: media_player.club
        icon: mdi:speaker-multiple
        use_media_info: false
        icon_type: icon
        secondary_info: name
        primary_info: none
        tap_action:
          action: navigate
          navigation_path: "#sonos"
        name: Groups
        layout: horizontal
        card_mod:
          style:
            mushroom-shape-icon$: |
              .shape {
                 padding-right: 0px;
                 padding-left: 3px;
                 padding-top: 0px;
                 border-radius: 0px !important;
                 
                 --icon-symbol-size: 15px;
                 --icon-size: 0px;
               }
            .: |
              ha-card {

                 margin-left: 0px;
                 margin-right: 0px;
                 padding-left: 0px;
                 margin-top: 2px;
               }
card_mod:
  style: |
    ha-card:before {
      transform: translate3d(0,0,0);
      -webkit-transform: translate3d(0,0,0);
      content: "";
      position: absolute;
      height: 100%;
      width: 100%;

      background: url('/local/idle_art.png') center no-repeat;
      {% if not is_state('media_player.currently_playing', 'idle') %}
      background: url( '{{ state_attr('media_player.club', "entity_picture") }}' ) center no-repeat;
      {% endif %}

      filter: blur(56px) hue-rotate(25deg) saturate(90%);
      background-size: 100% 100%;
    }
    ha-card {
      transform: translate3d(0,0,0);
      -webkit-transform:
2 Likes

Hi, maybe somebody can help me.

  - type: custom:mushroom-chips-card
    chips:
      - type: template
        entity: sensor.telefoon_van_elwin_battery_level
        icon: >
          {% set battery_level =
          states('sensor.telefoon_van_elwin_battery_level') | default('0') | int
          %} {% if is_state('binary_sensor.telefoon_van_elwin_is_charging',
          'on') %}
            mdi:battery-charging
          {% else %}
            {% if battery_level >= 90 %}
              mdi:battery
            {% elif battery_level >= 80 %}
              mdi:battery-80
            {% elif battery_level >= 70 %}
              mdi:battery-70
            {% elif battery_level >= 60 %}
              mdi:battery-60
            {% elif battery_level >= 50 %}
              mdi:battery-50
            {% elif battery_level >= 40 %}
              mdi:battery-40
            {% elif battery_level >= 30 %}
              mdi:battery-30
            {% elif battery_level >= 20 %}
              mdi:battery-20
            {% elif battery_level >= 10 %}
              mdi:battery-10
            {% else %}
              mdi:battery-alert
            {% endif %}
          {% endif %}
        icon_color: >
          {% set battery_level =
          states('sensor.telefoon_van_elwin_battery_level') | default('0') | int
          %} {% if battery_level >= 30 %}
            green
          {% elif battery_level >= 10 %}
            amber
          {% else %}
            red
          {% endif %}
        card_mod:
          style: |
            ha-card {
              background: transparent !important;
              box-shadow: none !important;
              border-width: 0 !important;
              padding-left: 35px;
              margin-top: -5px;
            }
            .content {
              {% if is_state('binary_sensor.telefoon_van_elwin_is_charging', 'on') %}
                animation: charge 5s linear infinite;
              {% endif %}
            }
            @keyframes charge {
              0%, 80% { clip-path: inset(0 0 0 0); }
              10% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 84%, 34% 84%, 34% 100%, 100% 100%, 100% 0%); }
              20% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 74%, 34% 74%, 34% 100%, 100% 100%, 100% 0%); }
              30% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 64%, 34% 64%, 34% 100%, 100% 100%, 100% 0%); }
              40% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 54%, 34% 54%, 34% 100%, 100% 100%, 100% 0%); }
              50% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 44%, 34% 44%, 34% 100%, 100% 100%, 100% 0%); }
              60% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 34%, 34% 34%, 34% 100%, 100% 100%, 100% 0%); }
              70% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 24%, 34% 24%, 34% 100%, 100% 100%, 100% 0%); }
            }

its working, but the only ugly thing is: After the animation is done, it will dissapear for like a second. This is not the case with a template card using “ha-state-icon”

Somebody knows how to fix this?

I have the following but when I add it to a badge using the new sections it doesn’t keep it’s alignment correctly for the bell and the hamburger.

Top is inside a the badge, below is before using a normal card inside a section. I’d like to maintain the layout of the bottom but inside a badge.

Code Snippet
type: custom:stack-in-card
cards:
  - type: custom:mushroom-chips-card
    chips:
      - type: menu
      - type: template
        content: "{{ now().strftime(\"%H:%M %a, %-d %b\") }}"
        card_mod:
          style: |
            /* Style date & time */
            ha-card {
              --chip-box-shadow: none;
              --chip-background: none;
              --chip-border-width: 0;
            }
      - type: template
        content: "{{ states('sensor.office_temperature') }} °C"
        show_conditions: true
        show_temperature: true
        tap_action:
          action: navigate
          navigation_path: heating
        card_mod:
          style: |
            /* Style date & time */
            ha-card {
              --chip-box-shadow: none;
              --chip-background: none;
              --chip-border-width: 0;
            }
      - type: template
        entity: input_boolean.notifications
        icon: mdi:bell
        tap_action:
          action: toggle
        hold_action:
          action: none
    alignment: justify
  - type: conditional
    conditions:
      - entity: input_boolean.notifications
        state: "on"
    card:
      type: custom:mushroom-chips-card
      chips:
        - type: template
          entity: alarm_control_panel.house
          icon: mdi:shield-home
          icon_color: |-
            {% set alarm_status = states(entity) %}
            {% if alarm_status == 'armed_away' %} 
              green
            {% elif alarm_status == 'disarmed' %}
              orange
            {% elif alarm_status == 'arming' %}
               yellow
            {% elif alarm_status == 'triggered' %}
               red
            {% endif %} 
          tap_action:
            action: fire-dom-event
            browser_mod:
              service: browser_mod.popup
              data:
                title: Alarm
                content:
                  type: custom:mushroom-alarm-control-panel-card
                  entity: alarm_control_panel.house
                  states:
                    - armed_away
          hold_action:
            action: none
        - type: conditional
          conditions:
            - entity: light.all_lights
              state: "on"
          chip:
            type: template
            icon: mdi:lightbulb
            entity: light.all_lights
            content: >
              {{ expand(states.light.all_lights) | selectattr('state', 'eq',
              'on') | list | count }}
            icon_color: amber
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Lights On
                  content:
                    type: custom:auto-entities
                    filter:
                      include:
                        - group: light.all_lights
                          state: "on"
                          options:
                            type: custom:mushroom-light-card
                            show_brightness_control: true
                            layout: horizontal
                            tap_action:
                              action: toggle
                            use_light_color: true
                        - entity_id: light.all_lights
                          state: "on"
                          options:
                            type: custom:mushroom-light-card
                            layout: horizontal
                            secondary_info: none
                            tap_action:
                              action: toggle
                            card_mod:
                              style: |
                                /* Style & position All Lights button */
                                ha-card {
                                  background: color-mix(in srgb, rgb(var(--rgb-state-light)) 10%, var(--card-background-color));
                                }
                                :host {
                                  margin: 0px 0px 12px !important;
                                }
                      exclude: []
                    card:
                      type: custom:layout-card
                      cards: []
                      layout_type: masonry
                    sort:
                      method: friendly_name
                  card_mod:
                    style: |
                      /* Position & style buttons */
                      .content {
                        margin: -24px -16px -24px -16px !important;
                        --ha-card-border-width: 0;
                        --ha-card-background: none;
                        --ha-card-box-shadow: 0;
                        --masonry-view-card-margin: -12px 0px 0px 0px;
                      }
        - type: conditional
          conditions:
            - entity: binary_sensor.all_doors
              state: "on"
          chip:
            type: template
            entity: binary_sensor.all_doors
            content: >
              {{ expand(states.binary_sensor.all_doors) | selectattr('state',
              'eq', 'on') | list | count }}
            icon_color: brown
            icon: mdi:door-open
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Doors Open
                  content:
                    type: custom:auto-entities
                    filter:
                      include:
                        - group: binary_sensor.all_doors
                          state: "on"
                          options:
                            type: custom:mushroom-entity-card
                            layout: horizontal
                            secondary_info: last-changed
                            icon_color: brown
                            tap_action:
                              action: none
                            hold_action:
                              action: none
                      exclude: []
                    show_empty: false
                    card:
                      type: custom:layout-card
                      cards: []
                      layout_type: masonry
                    sort:
                      method: friendly_name
                  card_mod:
                    style: |
                      /* Position & style buttons */
                      .content {
                        margin: -24px -16px -24px -16px !important;
                        --ha-card-border-width: 0;
                        --ha-card-background: none;
                        --ha-card-box-shadow: 0;
                        --masonry-view-card-margin: -12px 0px 0px 0px;
                      }
        - type: conditional
          conditions:
            - entity: binary_sensor.all_windows
              state: "on"
          chip:
            type: template
            icon_color: grey
            icon: mdi:window-open
            entity: binary_sensor.all_windows
            content: >
              {{ expand(states.binary_sensor.all_windows) | selectattr('state',
              'eq', 'on') | list | count }}
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Windows Open
                  content:
                    type: custom:auto-entities
                    filter:
                      include:
                        - group: binary_sensor.all_windows
                          state: "on"
                          options:
                            type: custom:mushroom-entity-card
                            layout: horizontal
                            secondary_info: last-changed
                            tap_action:
                              action: none
                            hold_action:
                              action: none
                      exclude: []
                    show_empty: false
                    card:
                      type: custom:layout-card
                      cards: []
                      layout_type: masonry
                    sort:
                      method: friendly_name
                  card_mod:
                    style: |
                      /* Position & style buttons */
                      .content {
                        margin: -24px -16px -24px -16px !important;
                        --ha-card-border-width: 0;
                        --ha-card-background: none;
                        --ha-card-box-shadow: 0;
                        --masonry-view-card-margin: -12px 0px 0px 0px;
                      }
        - type: conditional
          conditions:
            - entity: sensor.black_bin_days
              state_not: "2"
          chip:
            type: template
            icon_color: grey
            icon: mdi:trash-can
            tap_action:
              action: none
        - type: conditional
          conditions:
            - entity: sensor.brown_bin_days
              state_not: "2"
          chip:
            type: template
            icon_color: brown
            icon: mdi:trash-can
            tap_action:
              action: none
        - type: conditional
          conditions:
            - entity: sensor.blue_bin_days
              state_not: "2"
          chip:
            type: template
            icon_color: blue
            icon: mdi:trash-can
            tap_action:
              action: none
        - type: conditional
          conditions:
            - entity: sensor.devices_with_low_battery
              state_not: "0"
          chip:
            type: template
            entity: sensor.devices_with_low_battery
            content: |
              {{ states(config.entity) | int }}
            icon_color: red
            icon: mdi:battery-alert
            tap_action:
              action: fire-dom-event
              browser_mod:
                service: browser_mod.popup
                data:
                  title: Low Batteries
                  content:
                    type: custom:auto-entities
                    filter:
                      include:
                        - attributes:
                            device_class: battery
                          state: < 30
                          options:
                            type: custom:mushroom-template-card
                            primary: "{{ states(entity) }}%"
                            secondary: "{{ state_attr(entity, 'friendly_name') | title }}"
                            icon: >
                              {% set battery_level = (states(entity) | int / 10)
                              | round(0) | int * 10 %}

                              {% if battery_level == 100 %}
                                mdi:battery
                              {% elif battery_level > 0 %}
                                mdi:battery-{{ battery_level }}
                              {% else %}
                                mdi:battery-outline
                              {% endif %}
                            icon_color: |-
                              {% set battery_level = states(entity) | int %}
                              {% if battery_level > 90 %} 
                                green
                              {% elif battery_level > 60 %}
                                light-green
                              {% elif battery_level > 50 %}
                                lime
                              {% elif battery_level > 40 %}
                                yellow
                              {% elif battery_level > 30 %}
                                amber
                              {% elif battery_level > 20 %}
                                orange
                              {% elif battery_level > 10 %}
                                deep-orange
                              {% else %}
                                red
                              {% endif %} 
                            layout: horizontal
                            tap_action:
                              action: none
                            badge_icon: >-
                              {{ 'mdi:exclamation-thick' if states(entity) | int
                              < 10 }} 
                            badge_color: red
                      exclude: null
                    show_empty: false
                    card:
                      type: custom:layout-card
                      cards: []
                      layout_type: masonry
                    sort:
                      method: friendly_name
                  card_mod:
                    style: |
                      /* Position & style buttons */
                      .content {
                        margin: -24px -16px -24px -16px !important;
                        --ha-card-border-width: 0;
                        --ha-card-background: none;
                        --ha-card-box-shadow: 0;
                        --masonry-view-card-margin: -12px 0px 0px 0px;
                      }
        - type: conditional
          conditions:
            - entity: group.smoke_alarm
              state: "on"
          chip:
            type: template
            icon_color: red
            icon: mdi:fire-alert
            tap_action:
              action: more-info
            entity: group.smoke_alarm
            card_mod:
              style: |
                .content {
                  animation: blink 1s linear infinite;
                }
                @keyframes blink {
                  50% {opacity: 0;}
                }
      alignment: end
      card_mod:
        style: |
          /* Set margins on notification chips */
          ha-card {
            margin: var(--chip-spacing) calc(-1 * var(--chip-spacing)) 0px;
            transition: all 0s;
          }
card_mod:
  style: |
    /* Remove styling from top card with chips */
    ha-card {
      /* Allow pseudo elements to display outside card */
      overflow: visible !important;

      /* Remove gap at top of card */
      margin-top: calc(-1 * var(--mush-chip-spacing, 8px));

      /* Remove styling from card */
      box-shadow: none;
      border: none;
      background: none;
      padding: var(--mush-chip-spacing, 8px);
      transition: all 0s;
    }
    /* Pseudo element to hide card styling when at top */
    ha-card:after {
      content: "";

      /* Make fixed so element scrolls up */
      position: fixed;
      top: var(--header-height);

      /* Adjust height when notifications visible */
      height: {{ '104px' if is_state('input_boolean.notifications', 'on') else '60px' }};

      /* Set width to match */
      width: calc(100% - var(--mush-chip-spacing, 8px));
      max-width: calc(var(--column-max-width) - 2 * var(--ha-card-border-width, 1px) - var(--mush-chip-spacing, 8px));

      /* Center element on page */
      left: 50%;
      transform: translateX(-50%);

      /* Position between chips and background pseudo elemnt */
      z-index: -1;

      /* Match background to main card */
      background: color-mix(in srgb, var(--card-background-color) 40%, var(--primary-background-color));
      border-radius: 0px 0px var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
    }
    /* Pseudo element for background & other card styling */
    ha-card:before {
      content: "";

      /* Position & size card behind chips */
      position: absolute;
      top: 0px;
      left: 0px;
      height: 100%;

      /* Adjust width to account for border */
      width: calc(100% - 2 * var(--ha-card-border-width, 1px));

      /* Position card at back */
      z-index: -1;

      /* Blur content behind card */
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);

      /* Adjust opacity of card */
      background: rgba(var(--rgb-card-background-color), 0.8);

      /* Set styling of card */
      border-radius: 0px 0px var(--ha-card-border-radius, 12px) var(--ha-card-border-radius, 12px);
      box-shadow: var(--ha-card-box-shadow);
      border: var(--ha-card-border-width, 1px) solid var(--ha-card-border-color, var(--divider-color, #e0e0e0));
    }

1 Like

hi @rhysb,

Really like the animated Christmas Icon you’ve pulled together. New to this HA and with Christmas coming up, this icon would look great. However! i cant see any animations, amended the entity but its not looking anything like your one:

type: custom:stack-in-card
cards:
  - type: custom:mushroom-light-card
    entity: light.lounge_2
    icon: mdi:pine-tree
    use_light_color: true
    show_brightness_control: true
    show_color_temp_control: false
    show_color_control: false
    collapsible_controls: true
    card_mod:
      style: |
        ha-card {
          --ha-card-border-width: 0;
        }
  - type: custom:mushroom-template-card
    icon: mdi:star-four-points
    icon_color: yellow
    primary: Star
    card_mod:
      style:
        mushroom-shape-icon$: |
          ha-icon {
            --icon-animation: star 8s ease infinite alternate;
          }
          @keyframes star {
            0%, 100% { transform: translateY(-10px) rotate(0deg) scale(0.4); }
            50% { transform: translateY(-10px) rotate(360deg) scale(0.6); }
          }
          .shape {
            --shape-color: none;
          }
        .: |
          ha-card {
            width: 66px;
            top: -120px;
            --ha-card-border-width: 0;
          }
  - type: custom:mushroom-template-card
    icon: mdi:grain
    icon_color: red
    card_mod:
      style:
        mushroom-shape-icon$: |
          ha-icon {
            --icon-animation: flash 2s steps(1) infinite, lights 2s infinite;
            clip-path: polygon(51% 15%, 24% 74%, 74% 74%);
          }
          @keyframes flash {
            50% { transform: rotateY(180deg); }
          }
          @keyframes lights {
            0%, 100% {--icon-color: rgb(var(--rgb-red)); }
            6.25% { --icon-color: rgb(var(--rgb-deep-orange)); }
            12.5% { --icon-color: rgb(var(--rgb-orange)); }
            18.75% { --icon-color: rgb(var(--rgb-amber)); }
            25% { --icon-color: rgb(var(--rgb-yellow)); }
            31.25% { --icon-color: rgb(var(--rgb-lime)); }
            37.5% { --icon-color: rgb(var(--rgb-light-green)); }
            43.75% { --icon-color: rgb(var(--rgb-green)); }
            50% { --icon-color: rgb(var(--rgb-teal)); }
            56.25% { --icon-color: rgb(var(--rgb-cyan)); }
            62.5% { --icon-color: rgb(var(--rgb-light-blue)); }
            68.75% { --icon-color: rgb(var(--rgb-blue)); }
            75% { --icon-color: rgb(var(--rgb-indigo)); }
            81.25% { --icon-color: rgb(var(--rgb-deep-purple)); }
            87.5% { --icon-color: rgb(var(--rgb-purple)); }
            93.75% { --icon-color: rgb(var(--rgb-pink)); }
          }
          .shape {
            --shape-color: none;
          }
        .: |
          ha-card {
            width: 66px;
            top: -186px;
            --ha-card-border-width: 0;
          }
  - type: custom:mushroom-template-card
    icon: mdi:gift
    icon_color: red
    entity: light.lounge_2
    tap_action:
      action: toggle
    card_mod:
      style:
        mushroom-shape-icon$: |
          ha-icon {
            --icon-animation: surprise 4s ease infinite;
          }
          @keyframes surprise {
            0%, 20%, 100% { transform: translateY(0); }
            2.5% { transform: translateY(-2px) rotate(-27deg); }
            5% { transform: translateY(-2px) rotate(21deg); }
            7.5% { transform: translateY(-2px) rotate(-15deg); }
            10% { transform: translateY(-2px) rotate(9deg); }
            12.5% { transform: translateY(0); }
            15% { transform: translateY(-1.2px) }
          }
          .shape {
            --shape-color: none;
            --icon-size: 18px;
            top: 18px;
            left: 18px;
          }
        .: |
          ha-card {
            width: 66px;
            top: -252px;
            --ha-card-border-width: 0;
          }
card_mod:
  style: |
    ha-card {
      {{ 'height: 120px;' if is_state('light.lounge_2', 'on') else 'height: 66px;' }}
      {% set r = state_attr('light.lounge_2', 'rgb_color')[0] %}
      {% set g = state_attr('light.lounge_2', 'rgb_color')[1] %}
      {% set b = state_attr('light.lounge_2', 'rgb_color')[2] %}
      background-color: rgba( {{r}}, {{g}}, {{b}}, 0.1 );
    }

forgot to mention even just this from your example doesn’t animate - so guessing i am missing something? i’ve got browser-mod installed, mushroom, what else would be required?

type: custom:mushroom-template-card
icon: mdi:gift
icon_color: deep-orange
primary: Surprise
card_mod:
  style:
    mushroom-shape-icon$: |
      ha-icon {
        --icon-animation: surprise 3s ease infinite;
      }
      @keyframes surprise {
        0%, 20%, 100% { transform: translateY(0); }
        2.5% { transform: translateY(-6px) rotate(-14deg); }
        5% { transform: translateY(-6px) rotate(11deg); }
        7.5% { transform: translateY(-6px) rotate(-8deg); }
        10% { transform: translateY(-6px) rotate(5deg); }
        12.5% { transform: translateY(0); }
        15% { transform: translateY(-3px) }
      }

Hi all,

I’m playing around with animated icons based on entity states. For example, if my solar panels are providing energy, make the icon animate.

Now I want to create the same for my air condition units, when one of the three (or more) are active, make the icon animate. But so far I haven’t found an icon of a moving A/C, prefferebly this icon:
image
And my second question, how can I create this state? I was thinking of creating a helper group and using that to check if any of the A/C’s are running. But so far I haven’t been able to do this.

My thought was, I’m probably not the only one wanting this and someone probably has already created this. Hence why I’m posting here. :slight_smile:

Thanks in advance!

Good morning! can anyone tell me what to write in the code to have a light in the marked angle?

cards:
  - type: custom:button-card
    entity: sensor.a4c1382f4667_temperature
    show_icon: false
    name: Hall
    styles:
      card:
        - border-style: none
        - box-shadow: 0px 0px 10px -9px black
      custom_fields:
        temp:
          - filter: opacity(100%)
          - justify-self: start
          - margin-left: 10px
          - margin-top: 20px
          - padding-bottom: 10%
          - font-size: 65%
        graph:
          - padding-top: 0%
          - width: 100%
          - height: 100%
          - margin-bottom: "-3%"
      icon:
        - width: 25px
        - color: auto
      name:
        - font-size: 87%
        - font-weight: var(--mcg-title-font-weight, 500)
        - justify-self: start
        - margin-top: 6px
        - margin-left: 12px
        - opacity: 0.65
      grid:
        - grid-template-areas: "\"n n\" \"temp temp\" \"graph graph\""
        - grid-template-columns: 1fr min-content
        - grid-template-rows: 1fr min-content min-content min-content
    custom_fields:
      temp: |
        [[[
          return `<ha-icon
            icon="mdi:thermometer"
            style="width:18px; height: 18px; color:#ff8c00;">
            </ha-icon><span style="font-size:120%; font-weight: 300;"> 
            ${states['sensor.a4c1382f4667_temperature'].state}°C </span> 
            <ha-icon
            icon="mdi:water-percent"
            style="width: 18px; height: 18px; color: #3399ff;">
            </ha-icon><span style="font-size:120%; font-weight: 300; text-align: center;">
            ${states['sensor.a4c1382f4667_humidity'].state}%</span>`
        ]]]
    card_mod:
      style: |
        ha-card {
          z-index: 1;
          height: 70px !important;
        }

Hi all, I am asking for help with building a card for trv heating control.
There is a separate sensor for temperature and humidity and there is trv on the heating.
There are already fully working cards, but I would like to customize them a bit.
Here is a card that I like (not too big) and would like to add to it:

  • information on how much trv is open
  • the ability to select preset (this I just do not have enough)
  • System mode selection
  • Current heating setpoint
  • Possibility to display Position trv

all this is on the following picture, but it is big and built on custom:simple-thermostat card.

image

Code
type: custom:stack-in-card
cards:
  - type: custom:mushroom-climate-card
    entity: climate.bedroom_trv
    hvac_modes:
      - heat
      - auto
      - "off"
    show_temperature_control: null
    layout: horizontal
    collapsible_controls: null
    name: HALL
    icon: mdi:heating-coil
    preset_modes:
      - away
      - eco
      - boost
      - comfort
  - type: custom:stack-in-card
    cards:
      - type: grid
        square: false
        columns: 2
        cards:
          - type: custom:mushroom-entity-card
            entity: sensor.hall_temperature_temperature
            primary_info: state
            secondary_info: name
            name: Temperature
            icon_color: orange
          - type: custom:mushroom-entity-card
            entity: sensor.hall_temperature_humidity
            primary_info: state
            secondary_info: name
            name: Humidity
            icon_color: blue
      - type: custom:mini-graph-card
        entities:
          - entity: sensor.hall_temperature_temperature
            name: Temperature
            color: orange
          - entity: sensor.hall_temperature_humidity
            name: Humidity
            color: "#2196f3"
            y_axis: secondary
        hours_to_show: 24
        line_width: 3
        font_size: 50
        animate: true
        show:
          name: false
          icon: false
          labels: true
          state: false
          legend: false
          fill: fade
card_mod:
  style: |
    mushroom-shape-icon {
      {% if is_state(config.entity, 'auto') %}
        --card-mod-icon: mdi:autorenew;
        animation: spin 3s ease-in-out infinite alternate;
      {% elif is_state(config.entity, 'heat') %}
        --card-mod-icon: mdi:fire;
        animation: heat 2s infinite;
      {% elif is_state(config.entity, 'off') %}
        --card-mod-icon: mdi:water-percent;
        animation: dry 1.5s linear infinite;
      {% else %}
        --card-mod-icon: mdi:air-conditioner; 
      {% endif %}
      display: flex;
    }
    @keyframes auto {
      0%, 100% { transform: rotate(25deg); }
      25% { transform: rotate(-25deg); }
      50% { transform: rotate(50deg); }
      75% { transform: rotate(-50deg); }
    }
    @keyframes heat {
      0%, 100% { --icon-color: rgba(var(--rgb-red), 1); }
      10%, 90% { --icon-color: rgba(var(--rgb-red), 0.8); }
      20%, 80% { --icon-color: rgba(var(--rgb-red), 0.6); }
      30%, 70% { --icon-color: rgba(var(--rgb-red), 0.4); }
      40%, 60% { --icon-color: rgba(var(--rgb-red), 0.2); }
      50% { --icon-color: rgba(var(--rgb-red), 0); }
    }
    @keyframes off {
      0%, 100% { --icon-symbol-size: 21px; }
      10%, 90% { --icon-symbol-size: 22px; }
      20%, 80% { --icon-symbol-size: 23px; }
      30%, 70% { --icon-symbol-size: 24px; }
      40%, 60% { --icon-symbol-size: 25px; }
      50% { --icon-symbol-size: 26px; }
    }

example:

2 Likes

Is it possible to display an in-line image (not an emoji) in the primary or secondary information of a Mushroom Template Card like is it possible with a Markdown Card HTML img-src does not working with Mushroom while it is with Markdown as shown with these configurations. Any other suggestions? Thanks,

type: markdown
content: >-
  This is an in <img src="http://10.10.30.139:47474/flags/US" width="10"> line
  image from a local network file. Here is one from Flagpedia  <img
  src="https://flagcdn.com/16x12/us.png" width="12"> .
title: In-line image test Markdown Card
type: custom:mushroom-template-card
primary: In-line image test Mushroom Template Card
secondary: >-
  This is an in <img src="http://10.10.30.139:47474/flags/US" width="10"> line
  image from a local network file. Here is one from Flagpedia  <img
  src="https://flagcdn.com/16x12/us.png" width="12"> .
icon: ""

image

hello! Please could someone point me to the right direction on how to move the icon in the upper right corner without shape or background… something like this:

Screenshot 2024-12-09 alle 18.38.09

i’m using mushroom with a popup function and i would like to show an icon to indicate “tap me”

thanks a lot

Hello,
I’m facing an issue on displaying mushroom cards in tabbed card.
As you can see, the central corners of the cards are not rounded, only as of the second tab. Could you guide me to flag the problem here?
Thanks

https://ibb.co/B3Spffb
https://ibb.co/Gx2r90R

type: vertical-stack
cards:
  - type: custom:vertical-stack-in-card
    cards:
      - type: custom:tabbed-card
        tabs:
          - attributes:
              label: Floor 1
              icon: mdi:home-floor-1
              isMinWidthIndicator: false
              stacked: false
            styles:
              "--mdc-theme-primary": white
              "--mdc-tab-text-label-color-default": white
              "--mdc-typography-button-font-size": 12px
              "--mdc-tab-stacked-height": 55px
            card:
              type: vertical-stack
              cards:
                - type: custom:vertical-stack-in-card
                  cards:
                    - type: horizontal-stack
                      cards:
                        - type: custom:vertical-stack-in-card
                          cards:
                            - type: custom:mushroom-template-card
                              entity: light.chambre_parents_1
                              icon: mdi:bed-king
                              icon_color: |
                                {% if is_state(entity, 'on') %}
                                  #03A9F4
                                {% else %}  
                                  grey
                                {% endif %}
                              primary: Ch Parents
                              secondary: >-
                                🌡️ {{
                                states('sensor.thermostat_chambre_parents_temperature')
                                | round(1) }}°C  
                              layout: horizontal
                              hold_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/chparentsubview
                              double_tap_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/chparentsubview
                              tap_action:
                                action: call-service
                                service: light.toggle
                                target:
                                  entity_id: light.chambre_parents_1
                                data: {}
                              badge_icon: ""
                              badge_color: ""
                              fill_container: false
                              multiline_secondary: false
                              card_mod:
                                style:
                                  mushroom-state-info$: |
                                    .primary {
                                      font-size: 16px !important;
                                      position: relative;
                                      top: -50px;
                                      left: -155px;
                                      overflow: visible !important;
                                      
                                    }
                                    .secondary {
                                      position: relative;
                                      overflow: visible !important;
                                      top: -52px;
                                      left: -155px;
                                    }
                                  mushroom-shape-icon$: |
                                    .shape {
                                      position: relative;
                                      left: -43px;
                                      top: 55px;
                                    }
                                  .: |
                                    :host {
                                      --mush-icon-size: 146px;
                                    }
                            - type: custom:mushroom-chips-card
                              chips:
                                - type: template
                                  entity: light.chambre_parents_1
                                  
                                  icon: |-
                                    {% if is_state(entity, 'on') %} 
                                     mdi:lightbulb-on
                                    {% elif is_state(entity, 'unavailable') %} 
                                     mdi:lightbulb-alert
                                    {% else %}
                                     mdi:lightbulb
                                    {% endif %}
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'on') %} 
                                     amber
                                    {% elif is_state(entity, 'off') %} 
                                     grey
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: climate.room_climate_chambre_parents
                                  tap_action:
                                    action: more-info
                                  icon: mdi:thermostat
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'auto') %} 
                                     amber
                                    {% elif is_state(entity, 'heat') %} 
                                     red
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: media_player.echo
                                  icon: mdi:play-pause
                                  icon_color: |-
                                    {% if is_state(entity, 'playing') %} 
                                      #03A9F4
                                    {% else %}
                                     grey
                                    {% endif %}
                              alignment: center
                              card_mod:
                                style:
                                  .: |
                                    ha-card {
                                      width: 66px;
                                      margin-left: 65%;
                                      top: -170px;
                                      background: none;
                                      --chip-border-width: 0;
                                    }
                                  mushroom-template-chip: |
                                    ha-card {
                                      --ha-card-box-shadow: none;
                                      --chip-background: none;
                                      --chip-box-shadow: none;
                                    } 
                                  mushroom-template-chip:nth-child(1)$: |
                                    ha-state-icon {
                                      {% if is_state('light.chambre_parents_1', 'on') %}
                                        animation: illumination 2s infinite;
                                      {% endif %}
                                    }
                                    @keyframes illumination {
                                      0%, 100% { clip-path: inset(0 0 0 0); }
                                      80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); }
                                    }
                          card_mod:
                            style: |
                              ha-card {
                                height: 178px ;
                                margin-left: auto;
                                margin-right: auto;
                              }
                        - type: custom:vertical-stack-in-card
                          cards:
                            - type: custom:mushroom-template-card
                              entity: light.bureau_etage
                              icon: mdi:desk
                              icon_color: |
                                {% if is_state(entity, 'on') %}
                                  #03A9F4
                                {% else %}  
                                  grey
                                {% endif %}
                              primary: Bureau
                              secondary: >-
                                🌡️ {{
                                states('sensor.thermostat_bureau_temperature') |
                                round(1) }}°C  
                              layout: horizontal
                              hold_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/bureausubview
                              double_tap_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/bureausubview
                              tap_action:
                                action: call-service
                                service: light.toggle
                                target:
                                  entity_id: light.bureau_etage
                                data: {}
                              badge_icon: ""
                              badge_color: ""
                              fill_container: false
                              multiline_secondary: false
                              card_mod:
                                style:
                                  mushroom-state-info$: |
                                    .primary {
                                      font-size: 16px !important;
                                      position: relative;
                                      top: -50px;
                                      left: -155px;
                                      overflow: visible !important;
                                      
                                    }
                                    .secondary {
                                      position: relative;
                                      overflow: visible !important;
                                      top: -52px;
                                      left: -155px;
                                    }
                                  mushroom-shape-icon$: |
                                    .shape {
                                      position: relative;
                                      left: -43px;
                                      top: 55px;
                                    }
                                  .: |
                                    :host {
                                      --mush-icon-size: 146px;
                                    }
                            - type: custom:mushroom-chips-card
                              chips:
                                - type: template
                                  entity: light.bureau_etage
                                  
                                  icon: |-
                                    {% if is_state(entity, 'on') %} 
                                     mdi:lightbulb-on
                                    {% elif is_state(entity, 'unavailable') %} 
                                     mdi:lightbulb-alert
                                    {% else %}
                                     mdi:lightbulb
                                    {% endif %}
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'on') %} 
                                     amber
                                    {% elif is_state(entity, 'off') %} 
                                     grey
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: climate.room_climate_bureau
                                  tap_action:
                                    action: more-info
                                  icon: mdi:thermostat
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'auto') %} 
                                     amber
                                    {% elif is_state(entity, 'heat') %} 
                                     red
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: media_player.sc_lx56
                                  icon: mdi:play-pause
                                  icon_color: |-
                                    {% if is_state(entity, 'playing') %} 
                                      #03A9F4
                                    {% else %}
                                     grey
                                    {% endif %}                  
                              alignment: center
                              card_mod:
                                style:
                                  .: |
                                    ha-card {
                                      width: 66px;
                                      margin-left: 65%;
                                      top: -170px;
                                      background: none;
                                      --chip-border-width: 0;
                                    }
                                  mushroom-template-chip: |
                                    ha-card {
                                      --ha-card-box-shadow: none;
                                      --chip-background: none;
                                      --chip-box-shadow: none;
                                    } 
                                  mushroom-template-chip:nth-child(1)$: |
                                    ha-state-icon {
                                      {% if is_state('light.bureau_etage', 'on') %}
                                        animation: illumination 2s infinite;
                                      {% endif %}
                                    }
                                    @keyframes illumination {
                                      0%, 100% { clip-path: inset(0 0 0 0); }
                                      80% { clip-path: polygon(0% 99%, 20% 55%, 22% 37%, 39% 20%, 61% 21%, 77% 35%, 79% 57%, 99% 100%); }
                                    }
                          card_mod:
                            style: |
                              ha-card {
                                height: 178px ;
                                margin-left: auto;
                                margin-right: auto;
                              }
                  card_mod:
                    style: |
                      ha-card {
                        padding: 0px !important;
                        border: none !important;
                        box-shadow: none !important;
                        font-size: 3.5rem !important;
                        background: none !important;

                      }   
          - attributes:
              label: Floor 1
              icon: mdi:home-floor-1
              isMinWidthIndicator: false
              stacked: false
            styles:
              "--mdc-theme-primary": white
              "--mdc-tab-text-label-color-default": white
              "--mdc-typography-button-font-size": 12px
              "--mdc-tab-stacked-height": 55px
            card:
              type: vertical-stack
              cards:
                - type: custom:vertical-stack-in-card
                  cards:
                    - type: horizontal-stack
                      cards:
                        - type: custom:vertical-stack-in-card
                          cards:
                            - type: custom:mushroom-template-card
                              entity: light.chambre_parents_1
                              icon: mdi:bed-king
                              icon_color: |
                                {% if is_state(entity, 'on') %}
                                  #03A9F4
                                {% else %}  
                                  grey
                                {% endif %}
                              primary: Ch Parents
                              secondary: >-
                                🌡️ {{
                                states('sensor.thermostat_chambre_parents_temperature')
                                | round(1) }}°C  
                              layout: horizontal
                              hold_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/chparentsubview
                              double_tap_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/chparentsubview
                              tap_action:
                                action: call-service
                                service: light.toggle
                                target:
                                  entity_id: light.chambre_parents_1
                                data: {}
                              badge_icon: ""
                              badge_color: ""
                              fill_container: false
                              multiline_secondary: false
                              card_mod:
                                style:
                                  mushroom-state-info$: |
                                    .primary {
                                      font-size: 16px !important;
                                      position: relative;
                                      top: -50px;
                                      left: -155px;
                                      overflow: visible !important;
                                      
                                    }
                                    .secondary {
                                      position: relative;
                                      overflow: visible !important;
                                      top: -52px;
                                      left: -155px;
                                    }
                                  mushroom-shape-icon$: |
                                    .shape {
                                      position: relative;
                                      left: -43px;
                                      top: 55px;
                                    }
                                  .: |
                                    :host {
                                      --mush-icon-size: 146px;
                                    }
                            - type: custom:mushroom-chips-card
                              chips:
                                - type: template
                                  entity: light.chambre_parents_1
                                  
                                  icon: |-
                                    {% if is_state(entity, 'on') %} 
                                     mdi:lightbulb-on
                                    {% elif is_state(entity, 'unavailable') %} 
                                     mdi:lightbulb-alert
                                    {% else %}
                                     mdi:lightbulb
                                    {% endif %}
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'on') %} 
                                     amber
                                    {% elif is_state(entity, 'off') %} 
                                     grey
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: climate.room_climate_chambre_parents
                                  tap_action:
                                    action: more-info
                                  icon: mdi:thermostat
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'auto') %} 
                                     amber
                                    {% elif is_state(entity, 'heat') %} 
                                     red
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: media_player.echo
                                  icon: mdi:play-pause
                                  icon_color: |-
                                    {% if is_state(entity, 'playing') %} 
                                      #03A9F4
                                    {% else %}
                                     grey
                                    {% endif %}
                              alignment: center
                              card_mod:
                                style:
                                  .: |
                                    ha-card {
                                      width: 66px;
                                      margin-left: 65%;
                                      top: -170px;
                                      background: none;
                                      --chip-border-width: 0;
                                    }
                                  mushroom-template-chip: |
                                    ha-card {
                                      --ha-card-box-shadow: none;
                                      --chip-background: none;
                                      --chip-box-shadow: none;
                                    } 
                                  mushroom-template-chip:nth-child(1)$: |
                                    ha-state-icon {
                                      {% if is_state('light.chambre_parents_1', 'on') %}
                                        animation: illumination 2s infinite;
                                      {% endif %}
                                    }
                          card_mod:
                            style: |
                              ha-card {
                                height: 178px ;
                                margin-left: auto;
                                margin-right: auto;
                              }
                        - type: custom:vertical-stack-in-card
                          cards:
                            - type: custom:mushroom-template-card
                              entity: light.bureau_etage
                              icon: mdi:desk
                              icon_color: |
                                {% if is_state(entity, 'on') %}
                                  #03A9F4
                                {% else %}  
                                  grey
                                {% endif %}
                              primary: Bureau
                              secondary: >-
                                🌡️ {{
                                states('sensor.thermostat_bureau_temperature') |
                                round(1) }}°C  
                              layout: horizontal
                              hold_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/bureausubview
                              double_tap_action:
                                action: navigate
                                navigation_path: /mobile-mushroom/bureausubview
                              tap_action:
                                action: call-service
                                service: light.toggle
                                target:
                                  entity_id: light.bureau_etage
                                data: {}
                              badge_icon: ""
                              badge_color: ""
                              fill_container: false
                              multiline_secondary: false
                              card_mod:
                                style:
                                  mushroom-state-info$: |
                                    .primary {
                                      font-size: 16px !important;
                                      position: relative;
                                      top: -50px;
                                      left: -155px;
                                      overflow: visible !important;
                                      
                                    }
                                    .secondary {
                                      position: relative;
                                      overflow: visible !important;
                                      top: -52px;
                                      left: -155px;
                                    }
                                  mushroom-shape-icon$: |
                                    .shape {
                                      position: relative;
                                      left: -43px;
                                      top: 55px;
                                    }
                                  .: |
                                    :host {
                                      --mush-icon-size: 146px;
                                    }
                            - type: custom:mushroom-chips-card
                              chips:
                                - type: template
                                  entity: light.bureau_etage
                                  
                                  icon: |-
                                    {% if is_state(entity, 'on') %} 
                                     mdi:lightbulb-on
                                    {% elif is_state(entity, 'unavailable') %} 
                                     mdi:lightbulb-alert
                                    {% else %}
                                     mdi:lightbulb
                                    {% endif %}
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'on') %} 
                                     amber
                                    {% elif is_state(entity, 'off') %} 
                                     grey
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: climate.room_climate_bureau
                                  tap_action:
                                    action: more-info
                                  icon: mdi:thermostat
                                  hold_action:
                                    action: toggle
                                  icon_color: |-
                                    {% if is_state(entity, 'auto') %} 
                                     amber
                                    {% elif is_state(entity, 'heat') %} 
                                     red
                                    {% else %}
                                     grey
                                    {% endif %}
                                - type: template
                                  entity: media_player.sc_lx56
                                  icon: mdi:play-pause
                                  icon_color: |-
                                    {% if is_state(entity, 'playing') %} 
                                      #03A9F4
                                    {% else %}
                                     grey
                                    {% endif %}                  
                              alignment: center
                              card_mod:
                                style:
                                  .: |
                                    ha-card {
                                      width: 66px;
                                      margin-left: 65%;
                                      top: -170px;
                                      background: none;
                                      --chip-border-width: 0;
                                    }
                                  mushroom-template-chip: |
                                    ha-card {
                                      --ha-card-box-shadow: none;
                                      --chip-background: none;
                                      --chip-box-shadow: none;
                                    } 
                                  mushroom-template-chip:nth-child(1)$: |
                                    ha-state-icon {
                                      {% if is_state('light.bureau_etage', 'on') %}
                                        animation: illumination 2s infinite;
                                      {% endif %}
                                    }
                          card_mod:
                            style: |
                              ha-card {
                                height: 178px ;
                                margin-left: auto;
                                margin-right: auto;
                              }
                  card_mod:
                    style: |
                      ha-card {
                        padding: 0px !important;
                        border: none !important;
                        box-shadow: none !important;
                        font-size: 3.5rem !important;
                        background: none !important;

                      }                         
    card_mod:
      style: |
        ha-card {
          padding: 0px !important;
          border: none !important;
          box-shadow: none !important;
          font-size: 3.5rem !important;
          background: none !important;

        }                     

for starters, you should try to boil it down to a specific section in your config, and not have us check that complete yaml blurb…

help us help you, and make it as small as possible, and still failing

yep, it was already reduced…
But Found the culprit :slightly_smiling_face:
We need to add the Ha-card css at the tabcard level also…

styles: |
              ha-card {
                padding: 0px !important;
                border: none !important;
                box-shadow: none !important;
                font-size: 3.5rem !important;
                background: none !important;
      
              }

I also would like to know! I am trying to use chatgpt or other resources to trouble shoot, but I cant even get the top part to be sticky. Are you simply dropping it in as a top element as a card in a section and the card-mod part is supposed to hold it there?