weather-card
weather-card copied to clipboard
Custom element doesn't exist: weather-card
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?
the same problem in manual regretted the characters?
Hello! If you have recently added the www folder you will need to re-start Home Assistant.
I gave up on using lovelace through yaml files. Now I use the Configure UI button and everything works fine.
I get the same issue but JUST on some devices: android with chrome and raspberry pi with chromium
Am I doing anything wrong?
Clearing the browser's cache fixed it for me.
Press Ctrl+R to clear the cache it works for me.
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"));
I had this happen with Home Assistant 2023.3.4
Ctrl + R worked, thanks @kic883 ! :)