and fixed, by Thomas, so a big thanks is in order!
however, forcing me to move over from 3.1.4 (which has the changing icon in the header still functional) to the new 3.2.3.
This has another effect, namely I can no longer use my trusted mod on history-graph headers, which I used to simply set this class on:
ha-card.class-header-margin .card-header {
background-color: var(--background-color-off);
font-weight: 400;
font-size: 20px;
color: var(--text-color-off);
padding: 0px 12px;
margin: 0px 0px 16px 0px;
}
Ive been looking any the various examples here (and seem to remember a change in headers at some time, but cant find it), but I can not find the fix for this, so please could anyone help me out, how to mod the header and have it look like that again?
top is the class at work on a regular entities, below is the history-graph unmoddedā¦
Iāve also tried the mentioned
- type: history-graph
title: Temperatuur - Verwarming
card_mod:
style:
.: |
.card-header {
color: red;
font-size: 38px;
padding-bottom: 0px;
}
in this thread, without succes
same goed for any of the other graph-card btw, so its a bit of a wider issue for me than this card alone, appreciate a pointer to the change/fix
this mentions the change, š¹ Card-mod - Add css styles to any lovelace card - #3414 by Ildar_Gabdullin but I already applied that, and it doesnt work for the header
I had one spot where I took it into the shadow root with:
card_mod:
style:
$: |
.card-header {
background-color: var(--background-color-off);
font-weight: 400;
font-size: 20px;
color: var(--text-color-off);
padding: 0px 12px;
margin: 0px 0px 16px 0px;
}
and that actually does set the correct background-color, but all off the other properties are untouched, resulting in
and then in dawned on me, need !important:
card_mod:
style:
$: |
.card-header {
background-color: var(--background-color-off);
font-weight: 400 !important;
font-size: 20px !important;
color: var(--text-color-off) !important;
padding: 0px 12px !important;
margin: 0px 0px 16px 0px !important;
}
hardly a streamlined method, but it gets the job done. If anyone can instruct me to do it differently, please dont hold backā¦
leaving me with the ultimate challenge which !important cant solve either: how to change the icon of the view tab:
paper-tab[aria-label='Beweging'] ha-icon$: |
ha-svg-icon {
--card-mod-icon: {{'mdi:motion-sensor' if
is_state('binary_sensor.motion_sensors_all','on') else
'mdi:motion-sensor-off'}};
color: {{'red' if is_state('binary_sensor.motion_sensors_all','on')}};
}
it does set the color alright, heck, it even correctly applies the condition al animation I set.
and it worked up to 3.1.4.
cant make it change the icon though anymore, no matter what I try. And that is really a bummer, because I didnt have to open a view to check the weather, or see how many people are at home. Just a glance at the tab in the menu would disclose this vital info