File tree 3 files changed +5
-9
lines changed
3 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
- 0.0.1
1
+ 0.0.2
Original file line number Diff line number Diff line change
1
+ ## 0.0.2
2
+ Fix for card dissapearing when switching tabs
3
+
1
4
## 0.0.1
2
5
Initial release that supports versioning
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ class GroupCard extends HTMLElement {
9
9
const cardConfig = Object . assign ( { } , config ) ;
10
10
if ( ! cardConfig . card ) cardConfig . card = { } ;
11
11
if ( ! cardConfig . card . type ) cardConfig . card . type = 'entities' ;
12
-
13
12
const element = document . createElement ( `hui-${ cardConfig . card . type } -card` ) ;
14
13
this . appendChild ( element ) ;
15
14
this . _config = cardConfig ;
@@ -18,17 +17,11 @@ class GroupCard extends HTMLElement {
18
17
set hass ( hass ) {
19
18
const config = this . _config ;
20
19
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
-
27
20
if ( ! config . card . entities || config . card . entities . length !== entities . length ||
28
21
! config . card . entities . every ( ( value , index ) => value . entity === entities [ index ] . entity ) ) {
29
22
config . card . entities = entities ;
30
- this . lastChild . setConfig ( config . card ) ;
31
23
}
24
+ this . lastChild . setConfig ( config . card ) ;
32
25
this . lastChild . hass = hass ;
33
26
}
34
27
You can’t perform that action at this time.
0 commit comments