Skip to content

Commit 4f287c2

Browse files
committed
group card 0.0.2 (ciotlosm#144)
1 parent 1241a3c commit 4f287c2

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

group-card/VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.1
1+
0.0.2

group-card/changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
## 0.0.2
2+
Fix for card dissapearing when switching tabs
3+
14
## 0.0.1
25
Initial release that supports versioning

group-card/group-card.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ class GroupCard extends HTMLElement {
99
const cardConfig = Object.assign({}, config);
1010
if (!cardConfig.card) cardConfig.card = {};
1111
if (!cardConfig.card.type) cardConfig.card.type = 'entities';
12-
1312
const element = document.createElement(`hui-${cardConfig.card.type}-card`);
1413
this.appendChild(element);
1514
this._config = cardConfig;
@@ -18,17 +17,11 @@ class GroupCard extends HTMLElement {
1817
set hass(hass) {
1918
const config = this._config;
2019
const entities = hass.states[config.group].attributes['entity_id'];
21-
if (entities.length === 0 && config.show_empty === false) {
22-
this.style.display = 'none';
23-
} else {
24-
this.style.display = 'block';
25-
}
26-
2720
if (!config.card.entities || config.card.entities.length !== entities.length ||
2821
!config.card.entities.every((value, index) => value.entity === entities[index].entity)) {
2922
config.card.entities = entities;
30-
this.lastChild.setConfig(config.card);
3123
}
24+
this.lastChild.setConfig(config.card);
3225
this.lastChild.hass = hass;
3326
}
3427

0 commit comments

Comments
 (0)