thomasloven / lovelace-popup-card

94 stars 14 forks source link

Popup card not work after home assistant upgrade #7

Closed clementchik0308 closed 5 years ago

clementchik0308 commented 5 years ago

After upgraded to 0.87.0, popup card not working. Got below error:

http://192.168.1.1:8123/local/custom_card/popup-card.js:50:15 TypeError: undefined is not an object (evaluating 'moreInfo.style')

webbo1986 commented 5 years ago

Iv got the same problem all the other custom_cards Iv got work. Just not the pop up card. Hope someone can help!!!!

clementchik0308 commented 5 years ago

After upgraded to 0.87.0, popup card not working. Got below error:

http://192.168.1.1:8123/local/custom_card/popup-card.js:50:15 TypeError: undefined is not an object (evaluating 'moreInfo.style')

Just change line 49 to let moreInfo = document.querySelector("home-assistant")._moreInfoEl;

it works.

webbo1986 commented 5 years ago

Thanks for the fix, but still getting error. http://192.168.0.44:8123/local/popup_card.js:50:16 Uncaught TypeError: Cannot read property 'style' of undefined. any ideas

JohanLeirnes commented 5 years ago

Have you changed version in the include? skarmavbild 2019-02-08 kl 09 30 06

I would need to change the numbers at the end so that lovelace used the updated code.

JohanLeirnes commented 5 years ago

But that update did not fix it for me either

Im getting this error now.

/local/popup-card.js?v=0.0.11:50:15 TypeError: undefined is not an object (evaluating 'moreInfo.style')
JohanLeirnes commented 5 years ago

Ok,

So i updated Card-tools and this popup-card to the latest version and appended the url of the card to a new version so that the browser would read the new javascripts.

Now it works just fine.

So doublecheck that you have the latest version of both and change the version so that the browser re-read the javascripts @webbo1986

yabbah commented 5 years ago

Still not work for me. Cant even see that the code is updated in the history? I've updated both popup-card.js and card-tools.js and changed versionnumber in ui-lovelace.yaml.

Do it work for you @webbo1986 ?

webbo1986 commented 5 years ago

Not had chance to do it. I’m at work at the mo.

thomasloven commented 5 years ago

Fixed

webbo1986 commented 5 years ago

thanks, got it working. Use the new popup_card.js file or change line 49 to let moreInfo = document.querySelector("home-assistant")._moreInfoEl;

lovelace config file resources:

clear all caches & restart home assistant.