thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Card_mod in Entities disappears

duczz opened this issue · comments

My Home Assistant version: 2024.1.0

My lovelace configuration method (GUI or yaml):
yaml

What I am doing:
when i add these code snipped in an entities yaml, it is away and not be saved when i change something else in the entities, is that normal?
card_mod: style: | ha-card { --ha-card-border-width: 0; --card-primary-font-weight: normal; margin-left: -13px; mushroom-shape-icon { --shape-color: none; --icon-color: #44739e; } }

What I expected to happen:
i add a card_mod to remove the boarder

What happened instead:
card_mod is working, but when i add a new entitie card_mod is away in the other entitie

tracklist


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.

seems to same as #337

Info: This problem is only when i use card_mod in a entities card

example:

entities:
  - entity: input_boolean.heizperiode
    name: Heizperiode
    icon: mdi:thermostat-box-auto
  - type: custom:mushroom-select-card
    entity: input_select.advanced_heating_control_wohnzimmer_scheduler
    name: Scheduler
    icon: mdi:calendar-month-outline
    layout: horizontal
    secondary_info: none
    card_mod:
      style: |
        ha-card {
        --ha-card-border-width: 0;
        --card-primary-font-weight: normal;
        margin-left: -13px;
        mushroom-shape-icon 
          {
          --shape-color: none;
          --icon-color: #44739e;
          }
        }

Read 1 post above.
Besides, your card-mod code is wrong. Suggest to ask in Community first.

Update in my post: With correct Card-mod style the same result:

    card_mod:
      style: |
        ha-card {
          --ha-card-border-width: 0;
          --card-primary-font-weight: normal;
          margin-left: -12px;
        }
        mushroom-shape-icon {
          --shape-color: none !important;
          --icon-color: #44739e !important;
        }

Update: in my case the problem is rly the entities card

i tried now many examples and always when the card_mod is inside the entities card the card_mod will be removed, outside it is considert - reproducible

when i set the card_mod to the root entities card its working, when i set it inside the entitiy it will be removed

Not working:

type: entities
entities:
  - entity: input_boolean.heizperiode
    name: Heizperiode
    icon: mdi:thermostat-box-auto
    state_color: true
  - type: custom:mushroom-select-card
    entity: input_select.advanced_heating_control_wohnzimmer_scheduler
    name: Scheduler
    icon: mdi:calendar-month-outline
    layout: horizontal
    secondary_info: none
    card_mod:
      style: |
        ha-card {
          --ha-card-border-width: 0;
          --card-primary-font-weight: normal;
          margin-left: -12px;
        }
        mushroom-shape-icon {
          --shape-color: none !important;
          --icon-color: #44739e !important;
        }

working (code will not be removed, when i remove a entitiy via UI)

type: entities
entities:
  - entity: input_boolean.heizperiode
    name: Heizperiode
    icon: mdi:thermostat-box-auto
    state_color: true
  - type: custom:mushroom-select-card
    entity: input_select.advanced_heating_control_wohnzimmer_scheduler
    name: Scheduler
    icon: mdi:calendar-month-outline
    layout: horizontal
    secondary_info: none
card_mod:
  style: |
    ha-card {
      --ha-card-border-width: 0;
      --card-primary-font-weight: normal;
      margin-left: -12px;
    }
    mushroom-shape-icon {
      --shape-color: none !important;
      --icon-color: #44739e !important;
    }

Very persistent man. Two time you were told that the issue was already registered and yet you keep posting here.

yep, you said, and it looks like.
My oppinion is a different one.