Skip live subscriptions after the card disconnects
This commit is contained in:
@@ -1137,7 +1137,7 @@ class Ee extends A {
|
|||||||
return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t;
|
return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t;
|
||||||
}
|
}
|
||||||
_subscribeLive() {
|
_subscribeLive() {
|
||||||
if (this._subscribed)
|
if (!this.isConnected || this._subscribed)
|
||||||
return;
|
return;
|
||||||
const t = this._hassConnection();
|
const t = this._hassConnection();
|
||||||
if (!t)
|
if (!t)
|
||||||
@@ -2724,7 +2724,7 @@ class pn extends A {
|
|||||||
return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t;
|
return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t;
|
||||||
}
|
}
|
||||||
_subscribeLive() {
|
_subscribeLive() {
|
||||||
if (this._subscribed)
|
if (!this.isConnected || this._subscribed)
|
||||||
return;
|
return;
|
||||||
const t = this._hassConnection();
|
const t = this._hassConnection();
|
||||||
if (!t)
|
if (!t)
|
||||||
|
|||||||
@@ -755,6 +755,9 @@ export class NestQuestPartyBoardCard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _subscribeLive(): void {
|
private _subscribeLive(): void {
|
||||||
|
if (!this.isConnected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this._subscribed) {
|
if (this._subscribed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1401,6 +1401,9 @@ export class NestQuestQuestLogCard extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _subscribeLive(): void {
|
private _subscribeLive(): void {
|
||||||
|
if (!this.isConnected) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (this._subscribed) {
|
if (this._subscribed) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user