rhysb
(Rhys)
March 16, 2023, 8:53am
5954
Try like this:
mushroom-shape-icon$: |
.shape {
{% if is_state(config.entity, 'on') %}
--shape-animation: ping 2s infinite;
{% endif %}
}
@keyframes ping {
0% {
box-shadow: 0 0 5px 1px rgba(var(--rgb-blue), 0.7);
}
100% {
box-shadow: 0 0 5px 15px transparent;
}
}
.: |
ha-card {
--ha-card-border-width: 0;
}
1 Like
weppa
March 16, 2023, 10:03am
5955
You beauty!
/* Thanks! */
body::before {
content: "Thanks for styling my life!";
font-size: 2em;
color: #bada55;
text-align: center;
display: block;
margin-top: 20px;
}
1 Like
Radeaus
(Quinten)
March 16, 2023, 10:12am
5956
Does anyone know where the color codes for the icons are listed?
weppa
March 16, 2023, 10:16am
5957
Do you mean:
export const COLORS = [
"red",
"pink",
"purple",
"deep-purple",
"indigo",
"blue",
"light-blue",
"cyan",
"teal",
"green",
"light-green",
"lime",
"yellow",
"amber",
"orange",
"deep-orange",
"brown",
"grey",
"blue-grey",
"black",
"white",
"disabled",
];
Radeaus
(Quinten)
March 16, 2023, 10:25am
5958
Yes! But I need the colour for a custom card that does not register “green” for example. So a RGB or HEX code would be really helpful.
weppa
March 16, 2023, 10:37am
5959
--icon-color: rgb(var(--rgb-white));
gfandrea
(Andrea)
March 16, 2023, 10:45am
5960
here you can find the list of mushroom colors with RGB
1 Like
Never used that myself, and it’s nice! but, shouldn’t you be using background-blend-mode: darken
when in dark mode …
see: CSS background-blend-mode property
injectx
(Injectx)
March 16, 2023, 12:05pm
5963
For the love of god I cannot seem to get this “Goedemiddag, Roger ” text to turn bold:
- type: custom:mushroom-title-card
title: |-
{% set time = now().hour %}
{% if (time >= 18) %}
Goedenavond, {{user}}!
{% elif (time >= 12) %}
Goedemiddag, {{user}}!
{% elif (time >= 5) %}
Goedemorgen, {{user}}!
{% else %}
Hello, {{user}}
{% endif %}
subtitle: ''
card_mod:
style: |
ha-card {
margin-right: 0px;
}
.title {
font-size: 24px !important;
font-weight: bold !important;
}
Hi All,
I need help changing the icon color of individual entities for chip cards based on state. I have 4 chips nested in a vertical-stack card. I can get them all to change color when one of the four states is “on”, but I want the individual chip to change color when on and not all four. Can someone help me out with the code?
Attempt at individual chip change and does not work.
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Sprinklers
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: switch.flowerbeds
icon: mdi:sprinkler
name: Flower Beds
content_info: name
card_mod:
style: |
ha-card {
{% if states('switch.flowerbeds') == 'on' %}
--card-mod-icon-color: green;
{% endif %}
}
- type: entity
entity: switch.frontyard
icon: mdi:sprinkler
name: Front yard
content_info: name
- type: entity
entity: switch.backyard
icon: mdi:sprinkler
name: Backyard
content_info: name
- type: entity
entity: switch.sideyard
name: Side yard
content_info: name
icon: mdi:sprinkler
This way turns all green even if a single chip (entity) is on.
type: vertical-stack
cards:
- type: custom:mushroom-title-card
title: Sprinklers
- type: custom:mushroom-chips-card
chips:
- type: entity
entity: switch.flowerbeds
icon: mdi:sprinkler
name: Flower Beds
content_info: name
- type: entity
entity: switch.frontyard
icon: mdi:sprinkler
name: Front yard
content_info: name
- type: entity
entity: switch.backyard
icon: mdi:sprinkler
name: Backyard
content_info: name
- type: entity
entity: switch.sideyard
name: Side yard
content_info: name
icon: mdi:sprinkler
card_mod:
style: |
ha-card {
{% if states('switch.flowerbeds') == 'on' %}
--card-mod-icon-color: green;
{% elif states('switch.frontyard') == 'on' %}
--card-mod-icon-color: green;
{% elif states('switch.backyard') == 'on' %}
--card-mod-icon-color: green;
{% elif states('switch.sideyard') == 'on' %}
--card-mod-icon-color: green;
{% endif %}
}
cretzu8523
(8523tiberiu)
March 16, 2023, 6:53pm
5965
thank you for your answer, i used the darken mode baut i need to change that automaticaly.
rhysb
(Rhys)
March 16, 2023, 8:22pm
5966
The better one to use is background-blend-mode: saturation
. This will work with both dark and light modes.
1 Like
rhysb
(Rhys)
March 16, 2023, 8:25pm
5967
The Mushroom Title card does not have any ha-card
. You will need to use mod-card
:
If anyone needs to modify the Mushroom Title card, it can be done with card_mod like this:
[Mushroom Title Card]
type: custom:mod-card
card:
type: custom:mushroom-title-card
title: I'd rather be picking
subtitle: Mushrooms
card_mod:
style:
mushroom-title-card$: |
.title {
--primary-text-color: rgb(var(--rgb-grey));
--title-font-size: 20px;
--title-font-weight: lighter;
}
.subtitle {
--secondary-text-color: rgb(var(--rgb-red)); …
1 Like
rhysb
(Rhys)
March 16, 2023, 8:36pm
5968
The Mushroom colors are defined as HEX values in HA like this --[color]-color
:
--disabled-color
--red-color
--pink-color
--purple-color
--deep-purple-color
--indigo-color
--blue-color
--light-blue-color
--cyan-color
--teal-color
--green-color
--light-green-color
--lime-color
--yellow-color
--amber-color
--orange-color
--deep-orange-color
--brown-color
--light-grey-color
--grey-color
--dark-grey-color
--blue-grey-color
--black-color
--white-color
These can be used with most cards using var()
like this var(--pink-color)
.
The --rgb-[color]
values can only be used with a Mushroom card.
2 Likes
cretzu8523:
card_mod:
style: |
{%if is_state(‘light.salon’,‘on’)%}
ha-card {
height: 100px !important;
border: solid #B8860B ;
box-shadow: 0px 0px 9px 1px #DAA520 ;
background-image: url(’/local/sufragerie1.jpg’),linear-gradient(to left, transparent, rgba(var(–rgb-card-background-color)) 50% );
background-size: 50%, 100%;
background-color: rgba(0, 0, 0, 0.1);
background-position: right;
background-repeat: no-repeat;
background-blend-mode: lighten;
–primary-text-color: #DAA520 ;
–secondary-text-color: #447FA6 ;
–card-primary-font-size: 20px;
–card-secondary-font-size: 11px
}
{% else %}
ha-card {
height: 100px !important;
border: solid #A9A9A9 ;
box-shadow: 0px 0px 9px 1px #808080 ;
background-image: url(’/local/sufragerie1.jpg’),linear-gradient(to left, transparent, rgba(var(–rgb-card-background-color)) 50% );
background-size: 50%, 100%;
background-color: rgba(0, 0, 0, 0.1);
background-position: right;
background-repeat: no-repeat;
background-blend-mode: lighten;
–primary-text-color: #447FA6 ;
–secondary-text-color: #447FA6 ;
–card-primary-font-size: 20px;
–card-secondary-font-size: 11px
}
{%endif%}
btw, can you post the rest of the card config itself? I dont use these cards yet, and could use a head start
maniac365
(maniac365)
March 17, 2023, 5:41am
5970
I am trying to your album art with node-red but I am getting this error, I use echo dot as my speaker, have universal media player running, do you know why that field is empty?
rhysb
(Rhys)
March 17, 2023, 8:52am
5971
Add a debug node and see what the function node is outputting.
Noah
(Noah)
March 17, 2023, 9:25am
5973
Is it possible with the Mushroom Media player card to overwrite the entity image and also when using media infos, in certain cases with a template to overwrite the display text for priamary information?