Heya ,
I was hoping someone can help. I can’t get even the most basic card-mod to work on a dashboard, and I am not sure how to debug it.
Here are the deets:
This is my HA configuration:
- Core: 2025.1.2
- Supervision: 2024.12.3
- Operating System: 14.1
- Frontend: 20250109.0
I have the following card-mod configuration, installed using HACS:
- card-mod 3.4.4
- Installed in Dashboard Resources as:
/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524344
For performance, I also configured it in the frontend for preloading using configuration.yaml
:
frontend:
themes: !include_dir_merge_named themes
extra_module_url:
- /hacsfiles/lovelace-card-mod/card-mod.js
I have restarted my HA Green device. I can see in the browser console that it is successfully loading. It says “CARD-MOD 3.4.4 IS INSTALLED” in the console window when I load a dashboard.
I have completely flushed my browser cache, and attempted to run this in both public and private mode browsing.
To my understanding, with this configuration, I should be able to use the card-mod module.
Here is my basic dashboard to test it:
views:
- title: Home
sections:
- type: grid
cards:
- type: markdown
content: Hello World!
card-mod:
style: |
ha-card {
background: transparent;
text-align: center;
font-weight: bold;
}
However, this is not seeming to render properly in the browser, even in the shadow DOM. The goal is to remove the borders of a ha-card, remove the background color regardless of the theme, and center the text the the viewport.
This is what I see:
What exactly am I missing that is preventing this markdown card from altering it’s styling using card-mod?
Appreciate any help that can be provided. I’m sure it’s going to be something simple, but I am not sure how to debug this. I was going to open an issue on GitHub to ask the author, but after seeing the tone in Issue #332 it sounds like it might be better to ask someone in the community,
Thanks for reading this far. Any ideas how to debug this?