bugfix
This commit is contained in:
parent
dcb79b0909
commit
c806ca0b7d
@ -31,6 +31,8 @@ class StateSwitch extends cardTools.litElement() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateCard() {
|
updateCard() {
|
||||||
|
const hass = this._hass;
|
||||||
|
if(!hass) return;
|
||||||
const lastCard = this.currentCard;
|
const lastCard = this.currentCard;
|
||||||
if (this.config.entity === 'user') {
|
if (this.config.entity === 'user') {
|
||||||
this.currentCard = this.cards[hass.user.name]
|
this.currentCard = this.cards[hass.user.name]
|
||||||
@ -54,6 +56,7 @@ class StateSwitch extends cardTools.litElement() {
|
|||||||
|
|
||||||
set hass(hass) {
|
set hass(hass) {
|
||||||
if(!hass) return;
|
if(!hass) return;
|
||||||
|
this._hass = hass;
|
||||||
|
|
||||||
this.updateCard();
|
this.updateCard();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user