custom-cards / boilerplate-card

A community driven blueprint for best practices
MIT License
227 stars 166 forks source link

Undefined entity when loading Card #31

Closed carlba closed 4 years ago

carlba commented 4 years ago

Checklist:

Release with the issue:

Last working release (if known): Latest

Browser and Operating System: MacOs Latest version of Chrome

Description of problem: I have followed the guide to the point and HA is able to find the custom card but when it tries to load it this is show

Javascript errors shown in the web inspector (if applicable):

index.m.js:1 Uncaught (in promise) TypeError: Cannot read property 'entity' of undefined
    at Y (index.m.js:1)
    at HTMLElement.shouldUpdate (index.m.js:1)
    at HTMLElement.performUpdate (updating-element.js:552)
    at HTMLElement._enqueueUpdate (updating-element.js:507)

Additional information:

thatkookooguy commented 4 years ago

Same here. maybe something to do with an home assistant update?

iantrich commented 4 years ago

No, it's the code itself. The custom-card-helpers function checks if config or entity have changed. Should put a guard in there.

iantrich commented 4 years ago

Fixed in https://github.com/custom-cards/boilerplate-card/releases/tag/1.2.0