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

Can I change the color around a icon somehow without changing icon color? image

you can use card mod

After initial installation my Pi4 (8 GB) is around 5% with 2022.4.4 as before. I also use Mushroom.

This is the default “Area Card”, I’ve used Cardmod to adjust the height. The current Area Card isn’t super useful, but for now it works okay. The card links to a “room” page with more control options, graphs and so on.
I’m waiting for something like Room summary card · Issue #55 · piitaya/lovelace-mushroom · GitHub

Any idea how to use icon_color: for entity ? It’s work for template, but then i don’t have information about numbers of lights on.

Im guessing this is all of them, along with RGB values (which ive used when adding in non-mushroom cards)

3 Likes

Thank you!

1 Like

This is for my question ? i know colors :slight_smile: but can’t use them for entity like for template.

Use template chip instead of entity chip. Only template chip, template card and title properties allow template usage :slightly_smiling_face:

How can I display “number of lights on” in template card ? When I use template icon can change colours, but numbers of light is gone…
Primary is not working for me or I don’t know how to implement.

Btw, thank you for your work, is great add-on and really game changer for me. THX.

type: custom:mushroom-chips-card
chips:

  • type: template
    entity: sensor.number_of_lights_on
    icon: mdi:lightbulb
    tap_action:
    action: none
    hold_action:
    action: none
    double_tap_action:
    action: none
    icon_color: |-
    {% set state=states(‘sensor.number_of_lights_on’) %}
    {% if state==‘0’ %}
    black
    {% elif state!=‘0’ %}
    yellow
    {% endif %}

That is my code for counting lights on with color change

{% set count = namespace(value=0) %}
{% for state in states.light %}
  {%if state.state == "on" and 'ug' in state.entity_id | string%}
   {% set count.value = count.value + 1 %}
  {%endif%}
{%endfor%}
{% if count.value > 0%}
amber
{%else%}
grey
{%endif%}
2 Likes

How did you get the postnord sensor?

In template card is working.

but in template chip is not…

what im doing wrong ?

Now I know :), in template chip i have to use content: instead primary: :slight_smile:

3 Likes

Using this one:

1 Like

Another question, why i cant put ‘0’ as text in content templete chip ?

any diferent text string is working ok, i want display 0 when all lights off…

1 Like
  type: entity
  entity: sensor.current_lights_on
  tap_action:
    action: none
  hold_action:
    action: none
  double_tap_action:
    action: none
  icon_color: amber
  icon: mdi:lightbulb-group

and sensor for counting lights on (you could probably combine these to drop the sensor-entity)

        current_lights_on:
            friendly_name: All Lights Currently On
            value_template: >-
              {{ expand('light.alle_lys_lamper')|selectattr('state','eq','on')|list|count }}

Ah great, thanks! I’ve also got the banner card working with a picture background, that does the job for now.
That Room summary card looks also amazing!

I have the same problem, when no light is on, I don’t have the 0 displayed next to my icon, if I turn on one or more lights, the correct number is displayed next to the icon.

How can I have the 0 displayed next to my icon even if no light is on?

type: custom:mushroom-chips-card
chips:
  - type: template
    entity: sensor.lights_on_count
    icon: mdi:lightbulb-group
    content: '{{states(''sensor.lights_on_count'') }}'
    icon_color: |-
      {% set nbr= states('sensor.lights_on_count') | float %}
      {% if nbr> 0  %} 
      orange
      {% endif %}
    tap_action:
      action: navigate
      navigation_path: lights
alignment: center

How can i delete background from mushroom-template-card?

Hi.
Can someone help me. I try to create a area button. It should look like this:

image

But it looks like this:
image

My Question is, why this CSS is not working:

        card_mod:
          style: |
            .chip-container.align-end {
                justify-content: space-evenly;
            }

this is the css after reload:
image

1 Like