junkfix / numberbox-card

Replace input_number sliders with plus and minus buttons
109 stars 9 forks source link

Installation problems: "Custom element doesn't exist: numberbox-card." #83

Closed JohannesKlug closed 1 year ago

JohannesKlug commented 1 year ago

I'm trying to install this card following the instructions. My Home Assistant runs in Docker, and this is the first custom card I'm trying.

I placed the javascript file in /www/, and added the lovelace configuration lines. I then restarted the Docker container. This part seems to have worked, as I can now retrieve the JS file from my server using curl: curl http://192.168.x.y:8123/local/numberbox-card.js

However, when trying to add a custom card to my dashboard, I get this error: Custom element doesn't exist: numberbox-card. type: custom:numberbox-card

image

Can somebody help me troubleshoot this? Many thanks!

nepozs commented 1 year ago

Instead old way adding lovelace extensions you could try moderm way from GUI (I don't know if is it working with Docker/core installations, but nothing to loose): lovelace_modern_way_01_2023-04-13_21-54 lovelace_modern_way_02_2023-04-13_21-54 lovelace_modern_way_03_2023-04-13_21-54

JohannesKlug commented 1 year ago

Many thanks for the tip, @nepozs! I only have the first three menu items available, "Manage resources" is missing. Do you happen to know how I could enable it?

nepozs commented 1 year ago

Maybe it is disabled by entry in configuration.yaml (just delete it or comment out)

lovelace:
  resources:
[…] 
    - url: /local/numberbox-card.js?v=1
      type: module
# I don't know if any other resources are defined, so remove all in section above
# if you have more of them, they should be readded by GUI

and restart HA

One tip more: after big changes in lovelace (HA Dashboard) you should delete browser cache (usually in browser settings)