thomasloven/lovelace-card-modder

"undefined is not an object (evaluating 'hass.states') error with latest release

chipriley opened this issue · 1 comments

After upgrading to the latest release of card-modder, I'm now getting multiple Lovelace errors on several different card types. It's the standard red error box that begins with the title of this issue and then shows the code for the card. Currently identified card types affected are: weather-forecast, custom thermostat-card, media-control, tracker-card. Clearing cache doesn't fix anything. Confirmed on iOS (all browsers such as Safari, Chrome, etc) and MacOS (Safari 12.0.3 and Chrome Version 73.0.3683.27 (Official Build) beta (64-bit)). Using the Inspector shows multiple errors in the Console. One example is:

card-modder TypeError: Cannot read property 'states' of undefined
    at HTMLElement.set hass [as hass] (:8900/frontend_lates…19acc.chunk.js:3686)
    at HTMLElement.setConfig (:8900/local/card-modder.js?v=b0ddee:27)
    at create_card_element_createElement (:8900/frontend_lates…19acc.chunk.js:4600)
    at createCardElement (:8900/frontend_lates…19acc.chunk.js:4600)
    at :8900/frontend_lates…19acc.chunk.js:5516
    at Array.forEach (<anonymous>)
    at HTMLElement._createCards (:8900/frontend_lates…19acc.chunk.js:5516)
    at HTMLElement.updated (:8900/frontend_lates…19acc.chunk.js:5516)
    at HTMLElement._validate (app-19bfb9ea.js:1167)
    at HTMLElement._invalidate (app-19bfb9ea.js:1167)
create_card_element_createElement	@	:8900/frontend_lates…19acc.chunk.js:4600

EDIT: I'm running on port 8900, obviously...

Any ideas?