Initial card editor.
This commit is contained in:
+3
-2
@@ -1,5 +1,5 @@
|
||||
import { ActionConfig, LovelaceCard, LovelaceCardConfig, LovelaceCardEditor } from 'custom-card-helpers';
|
||||
import { z } from "zod";
|
||||
import { number, z } from "zod";
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
@@ -18,7 +18,8 @@ export const frigateCardConfigSchema = z.object({
|
||||
frigate_url: z.string().url(),
|
||||
frigate_camera_name: z.string().optional(),
|
||||
view_default: z.enum(["live", "clips", "clip", "snapshots", "snapshot"]).optional().default("live"),
|
||||
view_timeout: z.number().optional(),
|
||||
|
||||
view_timeout: z.number().or(z.string().regex(/^\d+$/).transform(val => Number(val))),
|
||||
live_provider: z.enum(["frigate", "webrtc"]).default("frigate"),
|
||||
webrtc: z.object({}).passthrough().optional(),
|
||||
label: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user