lovelace-card-mod: Card Mod does not work with custom template entity row card & after update to 2025.2.4
My Home Assistant version: 2025.2.4
My lovelace configuration method (GUI or yaml): GUI
What I am doing: Upgraded from 2024.12.5 to 2025.2.4
What I expected to happen: card mod modifications should work (color, icon changes, etc)
What happened instead: default colors, icon sizes remained
Minimal steps to reproduce:
type: entities
entities:
- type: custom:template-entity-row
entity: binary_sensor.contact_sensor
name: Main Door
toggle: false
secondary_info: last-updated
card_mod:
style: |
:host {
--mdc-icon-size: 40px;
--paper-item-icon-color:
{% if is_state('binary_sensor.contact_sensor', 'off') %}
green;
{% elif is_state('binary_sensor.contact_sensor', 'on') %}
red;
{% else %}
grey;
{% endif %};
}
# The least amount of code possible to reproduce my error
# End of code
Error messages from the browser console:
By putting an X in the boxes ([]) below, I indicate that I:
-
Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
-
Have made sure I am using the latest version of the plugin.
-
Have followed the troubleshooting steps of the “Common Problems” section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
-
Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (7 by maintainers)
Now finally works. I noticed, that on chrome on my android phone icons were colored…so issue was on webview app. Then i reinstalled a webview app on the android ->settings and now works also within Companion App. Thanks again for your support !