Accept weather_entity on the quest log card
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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<string, unknown> | 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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user