lovelace-card-mod: HA Update 2024.7.2 card_mod no longer seems to work properly
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
# The least amount of code possible to reproduce my error
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Wohnzimmer
secondary: >-
🌡️ {{ states('sensor.thermometer_wohnzimmer_temperature') }}ºC 💧
{{ states('sensor.thermometer_wohnzimmer_humidity') }}%
icon: mdi:sofa-outline
entity: sensor.thermometer_wohnzimmer_temperature
multiline_secondary: true
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon_color: blue
fill_container: true
layout: horizontal
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: 60px;
margin-left: -20px !important;
}
ha-card {
border-width: 0px;
box-shadow: 0px 0px;
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: sensor.thermometer_wohnzimmer_battery
icon: |2-
{% set level = states(entity) | int(0)%}
{% if level >= 90 %}
mdi:battery-90
{% else %}
{% set level = states(entity) | int(0)%}
{% if level >= 80 %}
mdi:battery-80
{% elif level >= 70 %}
mdi:battery-70
{% elif level >= 60 %}
mdi:battery-60
{% elif level >= 50 %}
mdi:battery-50
{% elif level >= 40 %}
mdi:battery-40
{% elif level >= 30 %}
mdi:battery-30
{% elif level >= 20 %}
mdi:battery-20
{% elif level >= 10 %}
mdi:battery-10
{% else %}
mdi:battery-sync-outline
{% endif %}
{% endif %}
icon_color: |-
{% set level = states(entity) | int(0) %}
{% if level >= 16 %}
green
{% elif level >= 15 %}
yellow
{% else %}
red
{% endif %}
- type: template
entity: light.wohnzimmer
icon: |-
{% if is_state(entity, 'on') %}
mdi:lightbulb-on-outline
{% else %}
mdi:lightbulb-off-outline
{% endif %}
icon_color: |-
{% if is_state(entity, 'on') %}
yellow
{% else %}
green
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: none
- type: template
entity: input_boolean.schalter_wz_lichtautomatik
icon: >-
{% if is_state(entity, 'on')%} mdi:lightbulb-auto {% else %}
mdi:lightbulb-auto-outline {%endif %}
icon_color: >-
{% if is_state(entity, 'on')%} green {% else %} red {% endif
%}
tap_action:
action: toggle
hold_action:
action: none
double_tap_action:
action: none
- type: template
entity: cover.rollos_wohnzimmer
icon: |-
{% if is_state(entity, 'open') %}
mdi:window-shutter-open
{% else %}
mdi:window-shutter
{% endif %}
icon_color: |-
{% if is_state(entity, 'on') %}
yellow
{% else %}
green
{% endif %}
tap_action:
action: call-service
service: browser_mod.popup
target:
device_id:
- 2b05e0fe48bf4
- a31f93115626a
data:
dismissable: true
autoclose: false
content:
type: vertical-stack
cards:
- features:
- type: cover-open-close
type: tile
entity: cover.rollo_wohnzimmerfenster
name: Wohnzimmerfenster
show_entity_picture: false
hide_state: false
vertical: true
- features:
- type: cover-open-close
type: tile
entity: cover.rollo_wohnzimmer_tur_links
name: Wohnzimmertür links
show_entity_picture: false
hide_state: false
vertical: true
- features:
- type: cover-open-close
type: tile
entity: cover.rollo_wohnzimmer_tur_rechts
name: Wohnzimmertür rechts
show_entity_picture: false
hide_state: false
vertical: true
timeout: 60000
title: Rollos Wohnzimmer
hold_action:
action: more-info
double_tap_action:
action: none
- type: template
entity: remote.wohnzimmer
icon: |-
{% if is_state(entity, 'on') %}
mdi:television-classic
{% else %}
mdi:television-classic-off
{% endif %}
icon_color: |-
{% if is_state(entity, 'on') %}
yellow
{% else %}
green
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: none
- type: template
entity: sensor.ps5_679_activity
icon: |-
{% if is_state(entity, 'on') %}
fab:playstation
{% else %}
fab:playstation
{% endif %}
icon_color: |-
{% if is_state(entity, 'on') %}
yellow
{% else %}
green
{% endif %}
tap_action:
action: toggle
hold_action:
action: more-info
double_tap_action:
action: none
alignment: left
card_mod:
style: |
ha-card {
--chip-border-width: 0px;
--chip-box-shadow: none;
--chip-background: none;
padding: 0px 10px 0px 0px;
}
card_mod:
style: |
ha-card {
height: 102px;
border-width: 0px;
box-shadow: 0px 0px;
}
card_mod:
style: |
ha-card {
background: transparent !important;
border-color: transparent !important;
box-shadow: none;
}
# End of code
picture 1:
picture 2:
Image 1 is before the update to HA 2024.7.2 and image 2 is after the update
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 1
- Comments: 19 (2 by maintainers)
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 😦
This is not about shutting you down - this is about
And yet you keep breaking all Github/Home Assistant conventions, and again post in the card-mod repo…
Hi,
So here is the code of my cards:
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.
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
same here