diff --git a/custom_components/nestquest/www/nestquest-cards.js b/custom_components/nestquest/www/nestquest-cards.js index ff722df..ede7aab 100644 --- a/custom_components/nestquest/www/nestquest-cards.js +++ b/custom_components/nestquest/www/nestquest-cards.js @@ -1137,7 +1137,7 @@ class Ee extends A { return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t; } _subscribeLive() { - if (this._subscribed) + if (!this.isConnected || this._subscribed) return; const t = this._hassConnection(); if (!t) @@ -2724,7 +2724,7 @@ class pn extends A { return !t || typeof t != "object" || typeof t.subscribeEvents != "function" ? null : t; } _subscribeLive() { - if (this._subscribed) + if (!this.isConnected || this._subscribed) return; const t = this._hassConnection(); if (!t) diff --git a/frontend/src/cards/party-board.ts b/frontend/src/cards/party-board.ts index 9a6b3af..d012872 100644 --- a/frontend/src/cards/party-board.ts +++ b/frontend/src/cards/party-board.ts @@ -755,6 +755,9 @@ export class NestQuestPartyBoardCard extends LitElement { } private _subscribeLive(): void { + if (!this.isConnected) { + return; + } if (this._subscribed) { return; } diff --git a/frontend/src/cards/quest-log.ts b/frontend/src/cards/quest-log.ts index ea8932a..fba8929 100644 --- a/frontend/src/cards/quest-log.ts +++ b/frontend/src/cards/quest-log.ts @@ -1401,6 +1401,9 @@ export class NestQuestQuestLogCard extends LitElement { } private _subscribeLive(): void { + if (!this.isConnected) { + return; + } if (this._subscribed) { return; }