Fix default card
This commit is contained in:
parent
9973e66c3d
commit
2b02f22084
@ -29,7 +29,7 @@ class StateSwitch extends Polymer.Element{
|
|||||||
this.currentCard = this.cards[hass.user.name] || this.cards[this.config.default];
|
this.currentCard = this.cards[hass.user.name] || this.cards[this.config.default];
|
||||||
} else {
|
} else {
|
||||||
let state = hass.states[this.config.entity];
|
let state = hass.states[this.config.entity];
|
||||||
this.currentCard = (state)?this.cards[state.state]:null || this.cards[this.config.default];
|
this.currentCard = ((state)?this.cards[state.state]:null) || this.cards[this.config.default];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.currentCard != lastCard) {
|
if(this.currentCard != lastCard) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user