Updated entityStateSchema to handle nullables (#1744)

Co-authored-by: Gleb Fomichev <gleb.fomichev@softswiss.com>
This commit is contained in:
gleb
2023-12-17 20:06:51 +03:00
committed by GitHub
parent 976634a908
commit 199b711324

View File

@@ -2,7 +2,7 @@ import { z } from 'zod';
export const entityStateSchema = z.object({
attributes: z.record(z.union([z.string(), z.number(), z.boolean()])),
attributes: z.record(z.union([z.string(), z.number(), z.boolean(), z.null()])),
entity_id: z.string(),
last_changed: z.string().pipe(z.coerce.date()),
last_updated: z.string().pipe(z.coerce.date()),