File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,18 @@ class TempometerGaugeCard extends HTMLElement {
29
29
cardConfig . entity = entityParts . entity ;
30
30
if ( entityParts . attribute ) cardConfig . attribute = entityParts . attribute ;
31
31
32
- const entityMinParts = this . _splitEntityAndAttribute ( cardConfig . entity_min ) ;
33
- cardConfig . entity_min = entityMinParts . entity ;
34
- if ( entityMinParts . attribute ) cardConfig . minAttribute = entityMinParts . attribute ;
35
-
36
- const entityMaxParts = this . _splitEntityAndAttribute ( cardConfig . entity_max ) ;
37
- cardConfig . entity_max = entityMaxParts . entity ;
38
- if ( entityMaxParts . attribute ) cardConfig . maxAttribute = entityMaxParts . attribute ;
32
+ if ( cardConfig . entity_min !== undefined ) {
33
+ const entityMinParts = this . _splitEntityAndAttribute ( cardConfig . entity_min ) ;
34
+ cardConfig . entity_min = entityMinParts . entity ;
35
+ if ( entityMinParts . attribute ) cardConfig . minAttribute = entityMinParts . attribute ;
36
+ }
39
37
38
+ if ( cardConfig . entity_max !== undefined ) {
39
+ const entityMaxParts = this . _splitEntityAndAttribute ( cardConfig . entity_max ) ;
40
+ cardConfig . entity_max = entityMaxParts . entity ;
41
+ if ( entityMaxParts . attribute ) cardConfig . maxAttribute = entityMaxParts . attribute ;
42
+ }
43
+
40
44
let card_style = cardConfig . style ;
41
45
const card = document . createElement ( 'ha-card' ) ;
42
46
const content = document . createElement ( 'div' ) ;
You can’t perform that action at this time.
0 commit comments