Skip to content

Commit

Permalink
Updated entityStateSchema to handle nullables (#1744)
Browse files Browse the repository at this point in the history
Co-authored-by: Gleb Fomichev <gleb.fomichev@softswiss.com>
  • Loading branch information
gfomichev and Gleb Fomichev authored Dec 17, 2023
1 parent 976634a commit 199b711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tools/server/sdk/homeassistant/models/EntityState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit 199b711

Please sign in to comment.