replica48
(Chris)
February 19, 2024, 2:41am
1
I’ve been using the card_mod parameters to edit cards on a dashboard I’m creating. I’ve found when I use the GUI editor on the dashboard, certain cards will just randomly lose the card_mod: section entirely. I can get around this if I make sure to never click to that column or section of a column, or I can work on things within the raw yaml view and it’s fine. Is this a bug, or something that I just haven’t been able to find in my searches here and Google? Anyone else experience this?
tom_l
February 19, 2024, 3:22am
2
Yes. It is a PITA. I actually have to edit some cards using the RAW edit mode. There are a couple of issues open for it.
opened 09:08PM - 30 Dec 23 UTC
Chrome 120.0.6099.130 (Win10x64).
FF 121 (Win10x64).
My Home Assistant vers… ion: 2023.12.1
My lovelace configuration method (GUI or yaml): storage
What I am doing:
Adding card-mod code for `custom:bar-card` inside a standard `vertical-stack`.
Using a standard HA UI editor.
What I expected to happen:
Card-mod code is saved after saving a card.
What happened instead:
1. Either card-mod code is not saved after saving a card.
2. Or card-mod code is automatically deleted after typing.
**Minimal** steps to reproduce:
1. Add a new card - select any card like "Alarm card".
2. Switch to yaml editor.
3. Paste a code provided below.
4. Start typing "card_mod" for the "bar-card".
5. If you manage to type the "card_mod" line - then type the whole card-mod code (see below).
6. Save the card.
7. Reopen the card in the Editor.
8. Check that card-mod code was deleted.
9. Start typing card-mod again.
10. Check that "card_mod" line is auto-deleted after typing.

```
type: vertical-stack
cards:
- type: custom:bar-card
entities:
- entity: sensor.processor_use
```
```
type: vertical-stack
cards:
- type: custom:bar-card
entities:
- entity: sensor.processor_use
card_mod:
style: |
ha-card {color: red;}
```
Error messages from the browser console:
none related.
---
**By putting an X in the boxes ([]) below, I indicate that I:**
- [x] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).
- [x] Have made sure I am using the latest version of the plugin.
- [x] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.
- [x] 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.
replica48
(Chris)
February 19, 2024, 4:08am
3
Thanks. Good to know I’m not the only one at least. I’ll try pulling the line from the configuration.yaml and see if that makes a difference for my instance.
ETA: Removing the line from the configuration file seems to have fixed it for me.