From 5278f130bd5b8a5d49e489c5a5b9c88282f235a0 Mon Sep 17 00:00:00 2001 From: Joshua Date: Sun, 20 Sep 2026 18:35:53 -0400 Subject: [PATCH] Accept weather_entity on the quest log card --- design/ENTITIES-AND-SERVICES.md | 1 + frontend/src/cards/quest-log.ts | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/design/ENTITIES-AND-SERVICES.md b/design/ENTITIES-AND-SERVICES.md index 798926b..71fce72 100644 --- a/design/ENTITIES-AND-SERVICES.md +++ b/design/ENTITIES-AND-SERVICES.md @@ -90,6 +90,7 @@ child_order: [declan, jordyn, chloe] # kids' panel, view 2 type: custom:nestquest-quest-log-card board_path: /nestquest/board +weather_entity: weather.home # optional; dock falls back to date/time idle_return_seconds: 40 # must be shorter than TouchHub Auto-Return confirm_timeout_seconds: 15 complete_screen_seconds: 12 diff --git a/frontend/src/cards/quest-log.ts b/frontend/src/cards/quest-log.ts index aaad08c..3271526 100644 --- a/frontend/src/cards/quest-log.ts +++ b/frontend/src/cards/quest-log.ts @@ -4,6 +4,10 @@ import panelTokens from "../../../custom_components/nestquest/www/nestquest-pane import { registerCustomCard, type CardConfig, type HassLike } from "../types"; +type QuestLogCardConfig = CardConfig & { + weather_entity?: string; +}; + type StateObject = { state: unknown; attributes?: Record | null; @@ -1344,7 +1348,7 @@ export class NestQuestQuestLogCard extends LitElement { static styles = [unsafeCSS(panelTokens), logStyles]; hass?: HassLike; - _config?: CardConfig; + _config?: QuestLogCardConfig; _now = new Date(); _confirm: number | null = null; /** instanceId → the completion instant stamped before the service has @@ -1358,7 +1362,7 @@ export class NestQuestQuestLogCard extends LitElement { private _toastTimer?: number; private _completeTimer?: number; - setConfig(config: CardConfig): void { + setConfig(config: QuestLogCardConfig): void { if (!config || typeof config !== "object") { throw new Error("Invalid configuration"); }