Mushroom Cards - Build a beautiful dashboard easily πŸ„ (Part 1)

your icon color says none. We have to move your if statement up there. Give me a minute.

yes because i want it black.
thanks please help

This is what I see with this code.

type: custom:mushroom-template-card
primary: |
  {{states('sensor.inverter_1_yield_today')}} kW
secondary: Heute
icon: mdi:lightning-bolt
icon_color: black
fill_container: true
entity: sensor.inverter_1_yield_today
tap_action:
  action: more-info
card_mod:
  style: |
    ha-card { 
          border: none; 
          border-radius: 25px; 
          --icon-symbol-size: 35px;
          --card-primary-color: black !important;   
          --card-secondary-color: black !important; 
          --card-secondary-font-weight: 400; 
          transition: 0s;
          background: 
            {% if states('sensor.inverter_1_bt2240102870_realtime_power') < '0.001'%}
            rgb(255, 255, 190)
            {% elif states('sensor.inverter_1_bt2240102870_realtime_power') >'0.001'%}
            rgb(255, 255, 80)
            {%endif%}
           }

Guys, 'bout chips, it possible to get animate?


and this is what I see :smiley:
what could it be?

Check out this

add !important; after the color black and do you have a theme installed?

the important changes nothing.
no theme installed

One last shot

type: custom:mushroom-template-card
primary: |
  {{states('sensor.inverter_1_yield_today')}} kW
secondary: Heute
icon: mdi:lightning-bolt
icon_color: black
fill_container: true
entity: sensor.inverter_1_yield_today
tap_action:
  action: more-info
card_mod:
  style: |
    ha-card { 
          border: none; 
          border-radius: 25px; 
          --icon-symbol-size: 35px;
          --card-primary-color: black !important;  
          --card-secondary-color: black !important; 
          --card-secondary-font-weight: 400; 
          transition: 0s;
          background: 
            {% if states('sensor.inverter_1_bt2240102870_realtime_power') < '0.001'%}
            rgb(255, 255, 190)
            {% elif states('sensor.inverter_1_bt2240102870_realtime_power') >'0.001'%}
            rgb(255, 255, 80)
            {%endif%}
           }
           @media screen and (max-width: 400px) {
                ha-card {
                 --card-primary-color: black !important;  
                 --card-secondary-color: black !important; 
                }
                  }

You should also be able to clean up you background if statement

background: 
            {% if states('sensor.inverter_1_bt2240102870_realtime_power') < '0.001'%}
            rgb(255, 255, 190)
            {% else %} 
            rgb(255, 255, 80)
            {% endif %}

no luck! still the same

Is your PC still correct? Ensure you are on Core 2024.2.1 and Mushroom 3.4.2

yes as u said. all up to date.
only on template card since update yesterday

Unfortunately I’m out of possible answers. Its working fine on my PC and my android.

I like it. Would you share your code?

For me, this works on Template Card

--primary-text-color: black !important;

Oh man, I saw it but miss it :frowning: Dope! Thanks!

Peek 2024-02-12 13-55

1 Like

@bandit79

--primary-text-color is going to work because card-primary color: uses it, but it can also change a lot of other text in your dashboard if you use --primary-text-color:

1 Like

@LiQuid_cOOled I have one more q, if a chip have a text, it possible animate icon only and text leave is in normal state?

this gives me grey color in the APP on Android

hi
i am trying to scale the icons of a mushroom chip card with templates (i.e. have bigger icons than the default). i have tried multiple solutions suggested here with card-mod and without but either i am too daft or none of them work for my scenario (snippet of the actual card):

type: custom:mushroom-chips-card
chips:
  - type: template
    entity: switch.tasmota
    icon_color: '{{ ''orange'' if states(''switch.tasmota'') == ''on'' else ''red'' }}'
    icon: mdi:power-socket-de
    content: LEDs

this works perfectly fine but the icons are ever so small on the phone.

any help would be much appreciated