Open pille89 opened 4 months ago
same here
same issue.
I use stack-in-card to show a mushroom template card and then below a mushroom chip card row, same as the submitter.
They used to look like this
Since either the latest HA update to 2024.7.x They now look like this
Somehow the alignment is messed up and also the bar with the chips card is no longer showing
Hi, I can confirm the issue with the same kind of code and mushroom cards.
I can also confirm that the position is off towards the bottom and there is no reaction regarding any alignment inputs since update to 2024.7.2.
This issue is open since 2 weeks. It would be nice if this could be fixed sometime as everyones dashboard is messed up due to this bug :(
Piling on here. Even simple card-mod settings just dont work:
- type: custom:bar-card
icon: mdi:white-balance-sunny
min: 0
max: 8
positions:
name: 'off'
icon: inside
severity:
- color: '#F9E400'
from: 0
to: 10
card-mod:
style: |
ha-card {
border: 1px solid red;
}
entities:
- entity: sensor.my_home_solar_power
And no red border:
Seeing the same non-working behaviour in 2024.7.3
Tried just a simple button card, with a simple style change. No difference
Card-Mod installed via HACS
Tested with and without frontend settings in config yaml: extra_module_url:
please close this issue, card-mod is not broken at all.
All of the above is either user error on the used method (why use card-mod when button-card has its own css options) or caused by other custom-cards configurations combinations.
Card-mod might not be completely doing in Sections what some hope it would, but that has more to do with the experimental state the Sections view is still in.
otoh, many things are possible, if users would make a true effort to walk the Dom, and find the correct property to mod.
Also, when asked for a minimal config, how would fit https://github.com/thomasloven/lovelace-card-mod/issues/383#issue-2402937066 into that category, and how could poster expect the repo owner to even start having a look....
anyways, 2024.8 is out, and card-mod is doing all it should do, as it hasn't stopped doing......
I am afraid most of recently raised issues should be closed due to: -- more than a possible influence of custom cards -- users' errors
Ok, so for me:
After more investigation, it seems that using the :host has some stuff that changed, but it's still necessary at some point. So what I did is play a bit with all the CSS modification, to get it working. Hence, card mod doesn't seems at fault, but the code we use which produce the kind of stuff pille89 is using (that I use too) seems to have changed.
@ParalaX002
Ok got it. I also use that card mod CSS. Since it seems you got it working again, could you share your modifications so that we can also try it out?
Thanks a lot!
- Then all the CSS broke with just updating to 2024.7
this is just plain nonsense, why do you say that. Could be that 1 or 2 mods you use on a tile card now need adaptation.
stating all CSS broke has no foundation at all. again, this non-Issue needs to be closed, and support questions should go to the community.
As long as you dont do that, you wont get help, because this is not the place for that
Don’t take it so on yourself. With the context, it was clear that in my configuration, all the transformation made didn’t work anymore. I’m not a css expert, so when everything is suddenly out of place, this is how it feels. I then explained why, and that it seems to be with the modification we make, which seems to come from the same kind of template with chips on the top and bottom of the card. I also ruled out the card mod here.
ill post here my new code but I’m away of the computer at the moment.
Hi,
So here is the code of my cards:
type: custom:stack-in-card
cards:
- type: custom:mushroom-chips-card
chips:
- type: spacer
- type: template
content_info: none
tap_action:
action: navigate
navigation_path: cave-batteries
icon: >
{% if [states('sensor.cave_battery') | float] | select('lt', 10) |
list | count > 0 %} mdi:battery-20 {% elif
[states('sensor.cave_battery') | float] | select('lt', 20) | list |
count > 0 %} mdi:battery-50 {% else %} mdi:battery {% endif %}
icon_color: >
{% if [states('sensor.cave_battery') | float] | select('lt', 10) |
list | count > 0 %} red {% elif [states('sensor.cave_battery') |
float] | select('lt', 20) | list | count > 0 %} orange {% else %} grey
{% endif %}
alignment: end
card_mod:
style:
.: |
ha-card {
--chip-spacing: 0;
--chip-border-width: 0;
--chip-background: none;
margin-right: 6px;
height: 25px;
}
- type: custom:mushroom-template-card
primary: Cave
tap_action:
action: navigate
navigation_path: cave
secondary: >
{{ states("sensor.cave_temperature") | round(1, default=0) }}°C | {{
states("sensor.cave_humidity") | round(1) }}% | {{
(states("sensor.prise_boiler_power") | float | round(1) ) | round(1) }}Wh
icon: mdi:home-floor-negative-1
icon_color: blue
fill_container: true
layout: horizontal
multiline_secondary: false
card_mod:
style: |
ha-card {
--chip-spacing: 0;
--chip-border-width: 0;
--chip-background: none;
--ha-card-border-width: 0;
margin-left: -25px;
margin-top: -55px;
}
:host
{
--mush-icon-size: 72px;
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: switch.prise_boiler
content_info: none
tap_action:
action: more-info
icon: mdi:water-boiler
icon_color: |
{% if is_state('switch.prise_boiler', 'on') %}
blue
{% else %}
grey
{% endif %}
- type: spacer
alignment: end
card_mod:
style: |
ha-card {
--chip-spacing: 0;
--chip-border-width: 0;
--chip-background: none;
margin-right: 6px;
margin-top: -25px;
}
card_mod:
style: |
ha-card {
background: rgba(25, 25, 25, 0.1);
}
Which gives this:
This is a simple ones, but it follows the card the author showed at first. I removed a lot of unused CSS that I had, and the margins are a lot of different. There was also some fideling with the ":host" and "ha-card". Not sure what it relates to, but it had an impact. I hope this can help.
I also ruled out the card mod here.
And yet you keep breaking all Github/Home Assistant conventions, and again post in the card-mod repo....
I also ruled out the card mod here.
And yet you keep breaking all Github/Home Assistant conventions, and again post in the card-mod repo....
Can we please focus on solving the problem instead of being pedantic about whatever rules? Sorry but either please contribute to a solution or let others do this. These comments are not helping anyone.
This is not about shutting you down - this is about
These comments Are helping a lot of people.
It is a fundamental principle to the entire community in GitHub and Homeassistant to post in the correct place, to help other users find it and contribute.
being as stubborn as above in fact doesn’t help anyone, and it is only because there is no moderation here this issue is not closed down yet.
You would have already found your answer in the community
FYI I have played around with the cards that did not show as they used to.
In fact I asked chatGTP for advice and voila it suggested to add one line
display: flex;
here is the modified code
card_mod: style: | :host([dark-mode]) { background: rgba(var(--rgb-primary-background-color), 0.2); } :host { background: rgba(var(--rgb-primary-text-color), 0.025); --mush-icon-size: 76px; height: 63px; margin-left: -21px !important; display: flex; }
That line of code restored to how it was. Anyone who also had that issue try adding this.
My Home Assistant version: 2024.7.2
My lovelace configuration method (GUI or yaml): both
What I am doing: See yaml code and image
What I expected to happen: see picture 1
What happened instead: see picture 2
picture 1:
picture 2:
Image 1 is before the update to HA 2024.7.2 and image 2 is after the update