Closed xator91 closed 4 years ago
i get the same error, after installing via hacs and then adding the stuff to yaml view
Added this to resources url: /community_plugin/homekit-panel-card/homekit-panel-card/.js type: module
Shouldnt that be
url: /community_plugin/homekit-panel-card/homekit-panel-card.js
type: module
Uncaught (in promise) TypeError: Cannot read property 'map' of undefined
at HTMLElement._renderEntities (homekit-panel-card.js:61)
at homekit-panel-card.js:25
at Array.map (
When loading page (view) it says (when i hit f12)
Hi @skank01,
Maybe the problem it that the homekit-panel-card directory should start with a capital H like this:
- url: /community_plugin/Homekit-panel-card/homekit-panel-card.js
type: module
Yes i changed that too, but now in the view, i dont see anything , its blank, no error, nothing, unless i press f12 and then i see
Uncaught (in promise) TypeError: Cannot read property 'map' of undefined at HTMLElement._renderEntities (homekit-panel-card.js:61) at homekit-panel-card.js:25 at Array.map () at homekit-panel-card.js:23 at Array.map () at HTMLElement._renderRows (homekit-panel-card.js:21) at HTMLElement.render (homekit-panel-card.js:18) at HTMLElement.update (lit-element.ts:217) at HTMLElement.performUpdate (updating-element.ts:704) at HTMLElement._enqueueUpdate (updating-element.ts:653)
When i try without columns, everything works as soon as i use columns, everything is gone
code i use:
[code] title: Test icon: mdi:test-tube path: test panel: true theme: ios-dark-mode cards:
[/Code]
It also happens to me, I just installed it via HACS, everything is correct, I add Lovelace and when I add the card I get the error
Creating a simple button I already get the error, in resources the code seems to be fine.
- type: module
url: /community_plugin/Homekit-panel-card/homekit-panel-card.js
The homekit-panel-card.js file is in place and my Home Assistant works fine, I even have other modules such as mini-graph-card, circle-sensor, bar-card and everything is correct.
This is my code
cards:
- type: 'custom:homekit-card'
title: Casa
entities:
- title: Luz
entities:
- entity: switch.luz
I think it doesn't load the js file, because in the code inspector of my browser this comes out. they load all but homekit-panel-card
Could someone teach me some code or something to see if I do it right?
Thank you very much, piece of development!
I think I have already detected the problem, in the iOS App if it works and in PC with the Chrome browser too, in the only place where I see the error "Custom element doesn't exist: homekit-card" is in FireFox v .73, everything is very crazy!
Hi @octaviz ,
Havent found it so far i don't have any problem and not all people that makes it hard to fix. I will check firefox maybe it is a firefox problem.
Also install latested version with HACS and maybe use the reinstall button in HACS sometimes it doesnt load the latest version in the interface and it refreshed after reinstall better!
@octaviz @skank01 @xator91
If you guys all had the problem on firefox i just released fix release that fixes the problem!!
WoW, works! and very fresh everything
That's the error on console:
SyntaxError: invalid regular expression flag shomekit-panel-card.js:186:382