Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

‘Custom element doesn’t exist:zha-network-visualization-card’ #23

Open
rayperkins1 opened this issue May 28, 2020 · 7 comments
Open

Comments

@rayperkins1
Copy link

Thank you for making this, it is really helpful in troubleshooting.

I was getting this error when trying to add the card to lovelace:
‘Custom element doesn’t exist:zha-network-visualization-card’

I was able to get zha-network-card to work, so I seemed to be doing something right. While trying to understand if the name of the custom card is from the java-script filename or from something in the file I noticed both zha-network-card.js and zha-network-visualization-card.js had a line like:
customElements.define("zha-network-visualization-card",ZHANetworkVisualizationCard);
But in the working zha-network-card.js file it was all on one line, while the visualization js had it on multiple lines. I edited the zha-network-visualization-card.js file so that it is on one line and now it works for me.

Maybe there is something else changed between my last failed attempt and this success but I thought I it was worth mentioning.

Here is a diff between the original and my edits:

www $ ls
zha-network-card.js                     zha-network-visualization-card.js
zha-network-visualization-card          zha-network-visualization-card.js.old2
www $ diff zha-network-visualization-card.js.old2 zha-network-visualization-card.js
--- zha-network-visualization-card.js.old2
+++ zha-network-visualization-card.js
@@ -210,7 +210,4 @@
   }
 }

-customElements.define(
-  "zha-network-visualization-card",
-  ZHANetworkVisualizationCard
-);
+customElements.define("zha-network-visualization-card",ZHANetworkVisualizationCard);
www $
@brgerig
Copy link

brgerig commented May 28, 2020

I'm having the same problem. Using your edit unfortunately didn't fix it for me. I also tried rename the .js.gz file, and using /local/community/zha-network-visualization-card/zha-network-visualization-card.js instead of /hacsfiles/zha-network-visualization-card/zha-network-visualization-card.js.

@fpschrisiom
Copy link

I copied the folder up a level and it instantly started working
\www\zha-network-visualization-card\

thops added a commit to thops/zha-network-visualization-card that referenced this issue Jun 27, 2020
@Bodge-IT
Copy link

I managed to get everything installed but mainly got the above error.
When I actually got it running - no idea how - I actually get a date-time output (1970-01-01 00:00:00) with an empty form field...
no visualization

@harbri
Copy link

harbri commented Jul 27, 2020

I'm also experiencing this issue after installing the integrations en custom card using HACS. Tried all suggestions mentioned above but without result. Also checked permissions but nothing wrong with that. Keep getting the error....

Screenshot 2020-07-27 at 18 57 28
Screenshot 2020-07-27 at 18 57 56

@dmulcahey
Copy link
Owner

@harbri What you installed is another card not this one... Look at the name of this repo and the files and look at the URL you have. This component is not on HACS. You installed my other card that shows a table of devices.

@harbri
Copy link

harbri commented Jul 27, 2020

Yep, you're right. Stupid mistake of me! Installed your other card and it's working now. Thanks.

@Bodge-IT
Copy link

My install just started working all of a sudden. I see now the date info is actually a recent date. Maybe just needed a little more patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants