Skip to content

Commit

Permalink
Make compatible with custom cards like vertical-stack-in-card
Browse files Browse the repository at this point in the history
  • Loading branch information
kalkih committed Oct 6, 2018
1 parent d014009 commit 3d48bb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mini-graph-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class MiniGraphCard extends LitElement {
};
}

createRenderRoot() {
return this;
}

set hass(hass) {
this._hass = hass;
const entity = hass.states[this.config.entity];
Expand All @@ -42,6 +46,7 @@ class MiniGraphCard extends LitElement {
throw new Error('You need the latest version of mini-graph-lib.js. \n Get the latest version here: https://github.com/kalkih/mini-graph-card/blob/master/mini-graph-lib.js');
}

this.style = 'display: flex;';
config.icon = config.icon || false;
config.more_info = (config.more_info !== false ? true : false);
config.hours_to_show = config.hours_to_show || 24;
Expand Down

0 comments on commit 3d48bb5

Please sign in to comment.