custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.93k stars 233 forks source link

custom element doesn't exist: button-card #552

Open lgagnon123 opened 2 years ago

lgagnon123 commented 2 years ago

I get the custom element doesn't exist: button-card error.

I am a newbie with limited technical knowledge in this specific environment.

What should I look for to resolve this issue? I can see I have successfully downloaded and install the button-card from HACS, and even with restarts, redownloads of the button, etc... I still get this error when I open the UI.

Thank you in advance for your help.

m-ring commented 2 years ago

I had the same issue. To solve it I had to add the following code to my ui-lovelace.yaml

resources:
  - url: ../../www/community/button-card/button-card.js
    type: module

and clear the browser cache for the card to show up. So, I had button-card installed via HACS, added the lines in the yaml-file, uninstalled the button-card via HACS. After reinstalling the button-card I was prompted with an option to clear the browser cache. I don't know if all these steps are necessary but this is what helped me.

jedusaad commented 2 years ago

I'm getting the same error here, i freshly installed the Minimalist UI, and manually added all dependencies. I've tried to add the resources as suggested on the last message, didn`t work for me as well. Neither refreshing the page view, or reloading the front end component on hacs or even the dumping cache from the browser.

CrimsonAC commented 1 year ago

Same for me. I just cannot figure out what i am doing wrong. I tried reinstalling from scratch and followed Everything Smart Home's video guide, but the problem is still there.

xchristheisx commented 1 year ago

Same issue here. Nothing is working

TomGillen commented 1 year ago

I am seeing this issue about 90% of the time. If i repeatedly refresh the page, it will partially load (looks like styling is broken) about 10% of the time, and very occasionally it will actually load correctly.

Mariusthvdb commented 1 year ago

custom:button-card is working perfectly fine, and was made completely up to date with the latest HA version 2023.4.

seems like the issues mentioned above might be caused by different type of config errors, but without any of you posting an actual config, there's not much to be done.

if you think you've installed correctly, check inspector console for the button-card line mentioning the version number. post screenshot like this:

Scherm­afbeelding 2023-04-02 om 17 58 45

if not, you should install correctly obviously. Use HACS, and if you use YAML method, be sure to reference the correct folder, like:

# https://github.com/custom-cards/button-card
# - url: /local/resources/button-card/button-card.js?v=3.4.2+fix
- url: /hacsfiles/button-card/button-card.js
  type: module

note I use HACS And yaml mode, so I need to make sure this path is correct. which it is ;-) The commented path is for when I edit, and want another resource file loaded for a moment.

configuration issues are not bugs, and should probably best be taken to the community, where you can more elaborately than here post your troubled configs

Boh1 commented 1 year ago

I see the same behavior using a Minimalist front end running on the iOS mobile app. About 50% of the time I see this error when switching to the app. Either restarting the app or refreshing makes it go away, but it's a sub par user experience and I really would like to solve this issue.

I agree that it's more likely a configuration issue, but it's an issue that appears to be common, and no one has really come up with a credible explanation or fix. But maybe we are just expecting Home Assistant / Lovelace to do things it simply cannot do reliably and need to lower our expectations accordingly.

For the record, running button-card version 3.5.0 installed through HACS.

Mariusthvdb commented 1 year ago

if anything, a common aspect would be Minimalist. did you check the dedicated topic in the community ?

edgarhuichen commented 1 year ago

I ran into the same issues. Apparently with the latest HAOS, you will need to add dashboard resources either via UI or in the ui-lovelace.yaml. Please refer to this page on how to do it: https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins