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


3 Likes

Do you know if its possible to add badges to mushroom chips?

Is there any way in which I can create a permanent dashboard that will be displayed all the time on a google home hub. ive tried to create a mushroom title card with the time and date on but I can’t find a way to increase the height and font size of the card.

Hey, is there a way how to make the cards the same height? the front door one is stack in the card, the alarmo is standard mushroom alarm panel.
image

EDIT: I figured it out - it was the fill container settings in the alarm panel card :smiley:

Any idea how I can align the icons on the right side when I have less than 4?

image

3 Likes

Does anyone know what the variable is for the background colour on original mini media player? So I can blend from cover art to the background?

Thanks a TON @rhysb . You are a life saver!

1 Like

welcome

for the config check I use the below component. There are few prerequisites (like appdeamon) you need to do

Thank you very much. I do have a github page but it only consists the details about my football page. But I will write down every detail on my pages as soon as I finish developing my mobile interface.

1 Like

I’m trying to get my audio/video setup into Mushroom and try to conceptualise how this should work and I have a mental block.

Here are the key components

  • Audio run via Logitech Media Server and hardware/software players (Squeezebox); I have player entities for these players

  • Audio is distributed through the house via a Control4 matrix amp; I have full access to the amp from Home Assistant thanks to @bigmac’s code. As a matrix amp you can route any input signal to any output. I have the following:

    • Home Assistant dropdown helpers for the audio input
    • Home Assistant toggle helpers to switch the channels on/off
    • HA number helpers for the volume for each channel
    • HA dropdown helpers for the zone selection
  • Denon AVR (entity: media_player.denon_avr_3313) with the following attributes:

    • source_list
    • sound_mode_list
    • I’d like to make these attributes available to the UI
  • LG TV connected to the AVR via HDMI; the TV has various attributes I’d like to make available to the UI

I’d like to be able to create a “media center” card of sorts with the following:

  • TV on/off and access to attributes; e.g. source_list, volume etc.
  • AVR on/off with access to the various attriutes
  • Control the various LMS players (on/off, start/stop, volume, music selection

What’s my best bet here to make this blend in with mushroom? There’s the universal media player, individual media players? How do I get access to the attributes from a mushroom card?

Would like to put together a strawman of the solution but don’t really know where to start…

Would you mind showing the card as well that goes with version 2 of your code? I’m trying to visualise the code as I’m in the midst of trying to create my “media center” as well (earlier post) and at the moment it’s a bit overwhelming as there are lots of moving parts :slight_smile:

Which RSS fees are you getting your news from? I tried to use BBC but it won’t get the images

If you look at the screenshot I posted it’s the same as that except the album art covers the whole background

Hi,
to use sidebar card, do I need to use YAML mode ?

Never mind, I fixed it:

I just added empty mushroom template cards.

7 Likes

I have a different question. I find myself sometimes unsure how I configured a mushroom entity or template card. E.g. is it “clickable” or not? Does clicking on the tv icon toggle the tv, or navigate me to my media view?
Does anyone else experience this as well, and how do you solve it?
I was thinking about a border around the icons, for actionable cards and a dotted border for navigational cards. Cards without border are then just informational.
Any hint on how to achieve that (with card mod) would be greatly appreciated as well!

Here ya go…

sensor:
  - platform: feedparser
    name: Westham
    feed_url: "https://www.football.london/west-ham-united-fc/?service=rss"
    date_format: "%a, %d %b %Y %H:%M:%S %Z"
    scan_interval:
      hours: 1
    # inclusions:
    #   - title
    #   - link
    #   - description
    #   - media
    #   - pubDate
    # exclusions:
    #   - language

  - platform: feedparser
    name: Scores
    feed_url: "https://crssnt.com/preview?id=xxxxxxxxxxx&name=OutputEng"
    date_format: "%a, %d %b %Y %H:%M:%S %Z"
    scan_interval:
      hours: 1

  - platform: feedparser
    name: EPL News
    feed_url: "https://www.espn.co.uk/espn/rss/football/news"
    date_format: "%a, %d %b %Y %H:%M:%S %Z"
    scan_interval:
      hours: 1

  - platform: feedparser
    name: Forest
    feed_url: "https://www.nottinghampost.com/sport/?service=rss"
    date_format: "%a, %d %b %Y %H:%M:%S %Z"
    scan_interval:
      hours: 1

  - platform: feedparser
    name: Liverpool
    feed_url: "https://www.liverpool.com/?service=rss"
    date_format: "%a, %d %b %Y %H:%M:%S %Z"
    scan_interval:
      hours: 1
1 Like

You can use a layout card (https://github.com/thomasloven/lovelace-layout-card) to get further control on layouts rather than empty template cards in you prefer.

Thank you. I think now is working properly.

Is it possible to change font size of title or subtitle in mushroom title card? Also height of card?

Regards

Hey all, im hoping smeone can help me

im wanting to a hide the below in the drop down folder HACS code, just unsure how to make it work

type: custom:stack-in-card
cards:
  - type: custom:stack-in-card
    cards:
      - type: custom:mushroom-template-card
        primary: Outdoor Entertaining
        secondary: |-
          {{ states('sensor.bom_beerburrum_humidity') | round(0) }}% | {{
                states('sensor.bom_beerburrum_current_temperature') | round(0) }}°C
        icon: mdi:grill
        entity: light.area_back_patio_lights_group
        icon_color: '{{ ''white'' if is_state(entity, ''on'') else ''white'' }}'
        tap_action:
          action: toggle
        hold_action:
          action: more-info
        double_tap_action:
          action: more-info
        fill_container: true
        card_mod:
          style: |
            :host {
              --mush-icon-size: 200px;
              height: 130px;
              background: url('') center;
              background-size: cover;
              background-blend-mode: color-dodge;
              background-color: rgba(var(--rgb-card-background-color), 0.5);
              margin-left: -34px !important;
              overflow: hidden;
              ha-card {
               --card-primary-font-size: 15px;
              --card-secondary-font-size: 15px;
               }
            }
            mushroom-shape-icon {
              --shape-color: rgba(var(--rgb-{{ 'amber' if is_state('light.area_laundry_courtyard_spotlights_group', 'on') else 'grey' }}), 0.3) !important;
            }    
      - square: false
        columns: 9
        type: grid
        cards:
          - type: custom:mushroom-template-card
            primary: ''
            secondary: ''
            icon: |-
              {% set state=states('light.back_patio_light_switch') %}
              {% if state=='on' %}
              hue:bulb-group-ceiling-round
              {% elif state=='off' %}
              hue:bulb-group-ceiling-round
              {% elif state=='unavailable' %}
              hue:bulb-group-ceiling-round
              {% endif %}
            entity: light.back_patio_light_switch
            icon_color: |-
              {% set state=states('light.back_patio_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='off' %}
              disabled
              {% elif state=='unavailable' %}
              red
              {% endif %}
            layout: vertical
            tap_action:
              action: toggle
            badge_color: |-
              {% set state=states('light.back_patio_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='off' %}
              disabled
              {% elif state=='unavailable' %}
              red
              {% endif %}
            badge_icon: |-
              {% set state=states('light.back_patio_light_switch') %}
              {% if state=='on' %}
              hue:room-terrace
              {% elif state=='off' %}
              hue:room-terrace
              {% elif state=='unavailable' %}
              hue:room-terrace
              {% endif %}
            card_mod:
              style: |
                mushroom-shape-icon {
                  --shape-color: none !important; 
                }
          - type: custom:mushroom-template-card
            primary: ''
            secondary: ''
            icon: |-
              {% set state=states('light.sidelane_light_switch') %}
              {% if state=='on' %}
              hue:wall-spot
              {% elif state=='off' %}
              hue:wall-spot
              {% elif state=='unavailable' %}
              hue:wall-spot
              {% endif %}
            entity: light.sidelane_light_switch
            icon_color: |-
              {% set state=states('light.sidelane_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            layout: vertical
            tap_action:
              action: toggle
            badge_color: |-
              {% set state=states('light.sidelane_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            badge_icon: |-
              {% set state=states('light.sidelane_light_switch') %}
              {% if state=='on' %}
              bha:light-string
              {% elif state=='off' %}
              bha:light-string
              {% elif state=='unavailable' %}
              bha:light-string
              {% endif %}
            card_mod:
              style: |
                mushroom-shape-icon {
                  --shape-color: none !important; 
                }
          - type: custom:mushroom-template-card
            primary: ''
            secondary: ''
            icon: |-
              {% set state=states('light.beergarden_light_switch') %}
              {% if state=='on' %}
              hue:ceiling-fugato-two
              {% elif state=='off' %}
              hue:ceiling-fugato-two
              {% elif state=='unavailable' %}
              hue:ceiling-fugato-two
              {% endif %}
            entity: light.beergarden_light_switch
            icon_color: |-
              {% set state=states('light.beergarden_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            layout: vertical
            tap_action:
              action: toggle
            badge_color: |-
              {% set state=states('light.beergarden_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            badge_icon: |-
              {% set state=states('light.beergarden_light_switch') %}
              {% if state=='on' %}
              mdi:glass-mug-variant
              {% elif state=='off' %}
              mdi:glass-mug-variant
              {% elif state=='unavailable' %}
              mdi:glass-mug-variant
              {% endif %}
            card_mod:
              style: |
                mushroom-shape-icon {--shape-color: none !important; }
          - type: custom:mushroom-template-card
            primary: ''
            secondary: ''
            icon: |-
              {% set state=states('light.pool_light_switch') %}
              {% if state=='on' %}
              hue:ceiling-fugato-two
              {% elif state=='off' %}
              hue:ceiling-fugato-two
              {% elif state=='unavailable' %}
              hue:ceiling-fugato-two
              {% endif %}
            entity: light.pool_light_switch
            icon_color: |-
              {% set state=states('light.pool_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            layout: vertical
            tap_action:
              action: toggle
            badge_color: |-
              {% set state=states('light.pool_light_switch') %}
              {% if state=='on' %}
              amber
              {% elif state=='unavailable' %}
              red
              {% elif state=='off' %}
              disabled
              {% endif %}
            badge_icon: |-
              {% set state=states('light.pool_light_switch') %}
              {% if state=='on' %}
              mdi:pool
              {% elif state=='off' %}
              mdi:pool
              {% elif state=='unavailable' %}
              mdi:pool
              {% endif %}
            card_mod:
              style: |
                mushroom-shape-icon {--shape-color: none !important; }
card_mod:
  style: |
    ha-card {
      height: 185px;
      background-size: cover;
      background-blend-mode: overlay;
      background-color: rgba(var(--rgb-card-background-color), 0.1);
      {% if is_state('light.area_laundry_courtyard_spotlights_group', 'on') %}
          box-shadow: 0 0 7px rgba(255, 152, 0, 0.8);
      {% endif %}
    }