Skip to content

Commit

Permalink
Update groupSchema, lightSchema, and sensorSchema to allow etag to be…
Browse files Browse the repository at this point in the history
… null
  • Loading branch information
Zehir committed Sep 8, 2024
1 parent ff0c199 commit ebf5b5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/rest-client/src/gateway/schemas/groupSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const groupSchema = z.strictObject({
.describe('The last action which was send to the group.'),
devicemembership: z.array(z.string())
.describe('If this group was created by a device (switch or sensor) this list contains the device ids.'),
etag: z.string()
etag: z.string().or(z.null())
.describe('HTTP etag which changes whenever the group changes.'),
scenes: z.array(z.strictObject({
id: z.string()
Expand Down
3 changes: 2 additions & 1 deletion packages/rest-client/src/gateway/schemas/lightSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ export const lightSchema = z.object({
swversion: z.string().or(z.null()).optional()
.describe('Firmware version.'),

etag: z.string(),
etag: z.string().or(z.null())
.describe('HTTP etag which changes whenever the light changes.'),

config: z.object({}).passthrough().optional()
.describe('Configuration of the light.'),
Expand Down
2 changes: 1 addition & 1 deletion packages/rest-client/src/gateway/schemas/sensorSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const sensorSchema = z.object({
.describe('The state of the sensor. Refer to Change sensor state for further details.'),
mode: z.number().optional()
.describe('The mode of the sensor. 1 = Scenes mode 2 = Two groups mode 3 = Color temperature mode (only available for dresden elektronik Lighting Switch)'),
etag: z.string()
etag: z.string().or(z.null())
.describe('HTTP etag which changes whenever the sensor changes.'),
uniqueid: z.string().optional()
.describe('The unique identifiers including the MAC address of the sensor.'),
Expand Down

0 comments on commit ebf5b5a

Please sign in to comment.