bramkragten / custom-ui

Lovelace custom-ui
177 stars 69 forks source link

Custom element doesn't exist: weather card #39

Closed dominikheinz closed 5 years ago

dominikheinz commented 5 years ago

Currently the weather card doesn't work at all. I followed the installation steps as explained in the guide, however in the UI I am prompted with the following error message:

image

I am using Firefox 66.0.5 (64-bit) and I tried the fixes suggested in the other issues such as setting javascript.options.dynamicImport to true in the about:config. This didn't fix the problem. I also tried the same thing in Chrome, the problem is the same.

How can I fix this? I would really love to use this card, but currently its unusable.

bramkragten commented 5 years ago

The weather card works, your setup is just not right.

Please share your complete config including paths you placed the files and resources config.

dominikheinz commented 5 years ago

I placed all files from the repo under /config/www/custom-lovelace/weather-card, that includes: weather-card-editor.js weather-card.js and a folder icons, with all the animated svg icons inside. I added the resources to the very top of the ui-lovelace.yaml in the config folder:

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

title: Home
views:
  - badges: []
    cards:
      - entity: light.nightlight
        name: Nightlight
        type: light
# ... more devices ...

The UI element has been added via the UI configuration by selecting manual card.

Did I link the resources section in the wrong file?

bramkragten commented 5 years ago

Do you have:

lovelace:
  mode: yaml

in configuration.yaml?

bramkragten commented 5 years ago

You can't use ui-lovelace.yaml and the UI editor at the same time. If you use the UI editor add the resources with the raw config editor in the UI.

dominikheinz commented 5 years ago

Alright, I added the resource via the raw config editor in the UI. I also made sure that mode: yaml is not set in the configuration.yaml When I do that I don't get the custom card error but the card just stays invisible. image Nothing is showing up on the UI. What could cause this?

bramkragten commented 5 years ago

Cleared the cache? Any errors in the console?