weather-card icon indicating copy to clipboard operation
weather-card copied to clipboard

Custom element doesn't exist: weather-card

Open chezpaul opened this issue 5 years ago • 8 comments

This is the error I get in my lovelace UI. "Custom element doesn't exist: weather-card"

This is my ui-lovelace code:

resources:
- url: /local/custom-lovelace/weather-card/weather-card.js
  type: module

cards:
  - type: custom:weather-card
    entity: weather.dark_sky
    icons: "/local/custom-lovelace/weather-card/icons/"
    current: true
    details: false
    forecast: true

The weather-card.js is the latest downloaded the raw version from github. My config:

#DARKSKY
weather:
  - platform: darksky
    api_key: !secret darksky_api_key
    mode: daily

js file and icon folder are both in www/custom-lovelace/weather-card

Am I doing anything wrong?

chezpaul avatar Feb 22 '20 02:02 chezpaul

the same problem in manual regretted the characters?

fedottt avatar Feb 25 '20 19:02 fedottt

Hello! If you have recently added the www folder you will need to re-start Home Assistant.

wowgamr avatar Feb 28 '20 13:02 wowgamr

I gave up on using lovelace through yaml files. Now I use the Configure UI button and everything works fine.

chezpaul avatar Feb 28 '20 17:02 chezpaul

I get the same issue but JUST on some devices: android with chrome and raspberry pi with chromium

piepolitb avatar May 07 '20 17:05 piepolitb

Am I doing anything wrong?

Clearing the browser's cache fixed it for me.

DSGMM-TIOT avatar May 12 '20 08:05 DSGMM-TIOT

Press Ctrl+R to clear the cache it works for me.

kic883 avatar Oct 29 '20 00:10 kic883

Change the first row in the weather-card.js into the following: const LitElement = customElements.get("hui-masonry-view") ? Object.getPrototypeOf(customElements.get("hui-masonry-view")) : Object.getPrototypeOf(customElements.get("hui-masonry-view"));

CptRic avatar Dec 30 '20 19:12 CptRic

I had this happen with Home Assistant 2023.3.4

Ctrl + R worked, thanks @kic883 ! :)

quadhammer avatar Mar 16 '23 00:03 quadhammer