diff --git a/custom_components/nestquest/www/nestquest-cards.js b/custom_components/nestquest/www/nestquest-cards.js index 1dca0fe..a6aa494 100644 --- a/custom_components/nestquest/www/nestquest-cards.js +++ b/custom_components/nestquest/www/nestquest-cards.js @@ -2670,7 +2670,7 @@ class dn extends A { }, 6e4), window.addEventListener("pointerdown", this._onActivity, !0), window.addEventListener("touchstart", this._onActivity, !0), window.addEventListener("keydown", this._onActivity, !0), this._armIdle(), this._logView().kind === "complete-day" && this._armCompleteTimer(); } updated() { - this._logView().kind === "complete-day" ? this._armCompleteTimer() : (this._clearCompleteTimer(), this._countdown = null); + this._logView().kind === "complete-day" ? (this._clearIdle(), this._armCompleteTimer()) : (this._clearCompleteTimer(), this._countdown = null, this._idleTimer === void 0 && this._armIdle()); } disconnectedCallback() { this._stopClock(), this._clearIdle(), this._clearConfirmTimer(), this._clearToastTimer(), this._clearCompleteTimer(), window.removeEventListener("pointerdown", this._onActivity, !0), window.removeEventListener("touchstart", this._onActivity, !0), window.removeEventListener("keydown", this._onActivity, !0), super.disconnectedCallback(); @@ -3343,7 +3343,7 @@ class dn extends A { this._clockTimer !== void 0 && (window.clearInterval(this._clockTimer), this._clockTimer = void 0); } _onActivity = () => { - this._armIdle(), this._confirm !== null && this._armConfirmTimer(); + this._logView().kind !== "complete-day" && this._armIdle(), this._confirm !== null && this._armConfirmTimer(); }; } customElements.define("nestquest-quest-log-card", dn); diff --git a/frontend/src/cards/quest-log.ts b/frontend/src/cards/quest-log.ts index c2dac58..aaad08c 100644 --- a/frontend/src/cards/quest-log.ts +++ b/frontend/src/cards/quest-log.ts @@ -1386,10 +1386,14 @@ export class NestQuestQuestLogCard extends LitElement { protected updated(): void { if (this._logView().kind === "complete-day") { + this._clearIdle(); this._armCompleteTimer(); } else { this._clearCompleteTimer(); this._countdown = null; + if (this._idleTimer === undefined) { + this._armIdle(); + } } } @@ -2341,7 +2345,9 @@ export class NestQuestQuestLogCard extends LitElement { } private _onActivity = (): void => { - this._armIdle(); + if (this._logView().kind !== "complete-day") { + this._armIdle(); + } if (this._confirm !== null) { this._armConfirmTimer(); }