home-card
home-card copied to clipboard
Release 2021.6.0 - 2021.6.0 broke Home-Card
I love Home-Card. It is the centerpiece of my HA dashboard.
2021.6.0 appears to have broken Home-Card. Any thoughts?
Let me know what information you need, if you think can be corrected.

Yes, same thing on my side after update to 2021.6.0
After investigation, this seems to be linked to the upgrade to Lit 2.0: https://developers.home-assistant.io/blog/2021/05/19/lit-2.0/ I have changed the header of the /home-card/home-card.js as follows and it seems to have done the trick without having to update the whole code.
` import { THEMES } from './themes.js'; import { LitElement, html, css } from "https://unpkg.com/[email protected]/lit-element.js?module";
// const LitElement = Object.getPrototypeOf( // customElements.get("ha-panel-lovelace") // ); // const html = LitElement.prototype.html; // const css = LitElement.prototype.css; `
Actually, I have kept the './themes.js' in the home-card.js My frontend skills are close to none but from the 2021.6 breaking change notes I noticed that LitElement and lit-html have been deprecated in favor for Lit 2.0. I have just commented out these lines:
'const LitElement = Object.getPrototypeOf( customElements.get("ha-panel-lovelace") ); const html = LitElement.prototype.html; const css = LitElement.prototype.css;'
and added this instead:
'import { LitElement, html, css } from "https://unpkg.com/[email protected]/lit-element.js?module";'
that looks like what I have, but it doesn't seem to cooperate with me here.
'import { LitElement, html, css } from "https://unpkg.com/[email protected]/lit-element.js?module";'
// const LitElement = Object.getPrototypeOf( // customElements.get("ha-panel-lovelace") // ); // const html = LitElement.prototype.html; // const css = LitElement.prototype.css;
const VERSION = 3;
When any of you guys have anything that works, please open a PR so I can merge it. I'm quite passive when it comes to maintaining this project right now.
Works fine on my side but I had to restart HA and clear my browser's cache first. Thanks for the good work BTW :)
Sorry, I had not cleared my cache. Clearing my cache worked here, too.
I have cleared cache and rebooted it still puts all the image parts to one side stacked on top of each other. I even changed the header to the information that Groues stated above but still no joy getting the images back into there right places. I love this card too and want it to work right.
When any of you guys have anything that works, please open a PR so I can merge it. I'm quite passive when it comes to maintaining this project right now. @postlund #26 should take care if it.
Merged!