@@ -184,7 +184,13 @@
orderedGroups
) {
if (!panelVisible || !viewVisible) {
+ if (this.$.main.parentNode) {
+ this.$.main._parentNode = this.$.main.parentNode;
+ this.$.main.parentNode.removeChild(this.$.main);
+ }
return;
+ } else if (!this.$.main.parentNode && this.$.main._parentNode) {
+ this.$.main._parentNode.appendChild(this.$.main);
}
this._debouncer = Polymer.Debouncer.debounce(
this._debouncer,
@@ -198,14 +204,19 @@
);
}
- computeCards(columns, states, orderedGroups) {
- const hass = this.hass;
-
- const cards = {
+ emptyCards() {
+ return {
demo: false,
badges: [],
columns: [],
};
+ }
+
+ computeCards(columns, states, orderedGroups) {
+ const hass = this.hass;
+
+ const cards = this.emptyCards();
+
const entityCount = [];
for (let i = 0; i < columns; i++) {
cards.columns.push([]);