bramkragten / weather-card

Weather Card with animated icons for Home Assistant Lovelace
MIT License
502 stars 174 forks source link

Custom element doesn't exist: weather-card #28

Open chezpaul opened 4 years ago

chezpaul commented 4 years ago

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?

fedottt commented 4 years ago

the same problem in manual regretted the characters?

wowgamr commented 4 years ago

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

chezpaul commented 4 years ago

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

piepolitb commented 4 years ago

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

DSGMM-TIOT commented 4 years ago

Am I doing anything wrong?

Clearing the browser's cache fixed it for me.

kic883 commented 4 years ago

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

CptRic commented 3 years ago

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"));

quadhammer commented 1 year ago

I had this happen with Home Assistant 2023.3.4

Ctrl + R worked, thanks @kic883 ! :)

MyWebmasterD commented 1 month ago

I have the same issue only from my Android tablet Samsung A6... anyone knows how to solve the issue?