thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.08k stars 168 forks source link

Custom element doesn't exist: mod-card. #186

Closed Stefano0042 closed 2 years ago

Stefano0042 commented 2 years ago

My Home Assistant version: 2022.3

My lovelace configuration method (GUI or yaml): GUI

What I am doing: make use of "custom: mod-card" on vertical-stack card /card-mod.js installed as frontend extra-module

What I expected to happen: styling cards without an element

What happened instead: "Custom element doesn't exist: mod-card."

The least amount of code possible to reproduce my error

Custom element doesn't exist: mod-card.
type: custom:mod-card
card:
  type: vertical-stack
  cards:
    - type: entities
      entities:
        - sensor.pid_temperature
card_mod:
  style: |
    ha-card {
      --ha-card-background: teal;
    }

By putting an X in the boxes ([]) below, I indicate that I:

RomRider commented 2 years ago

Same here, eventually after refreshing the page 10 times it shows up one time and then breaks again on the next refresh.

troinine commented 2 years ago

Same here when upgrading to HA 2022.3.3. Reverting back to 2022.2.9 fixes the issue but this prevents the upgrade to any 2022.3.x version it seems.

Looks like a duplicate to #185. My card-mod config is as follows:

frontend:
  extra_module_url:
    - /local/community_cards/card-mod.js

I have not tested loading card-mod as a resource but by the looks of it, people have been struggling with that config as well.

ildar170975 commented 2 years ago

to install the slider.

This issue is not related to card-mod.

andrewbpowers commented 2 years ago

I have already noticed and deleted the post. Sorry!

thomasloven commented 2 years ago

Duplicate of #185