Updated entityStateSchema to handle nullables (#1744)

Co-authored-by: Gleb Fomichev <gleb.fomichev@softswiss.com>
This commit is contained in:
glebandGleb Fomichev authored and GitHub committed 2023-12-17 18:06:51 +01:00
1 parent 976634a908
commit 199b711324
1 file changed
+1 -1
@@ -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()),