Add shortcut for a camera to depend on all others.

This commit is contained in:
Dermot Duffy
2022-06-08 21:45:11 -07:00
parent a2e1ad161b
commit 40be446c69
7 changed files with 41 additions and 17 deletions
+8 -1
View File
@@ -375,6 +375,7 @@ export const cameraConfigDefault = {
trigger_by_motion: false,
trigger_by_occupancy: true,
trigger_by_entities: [],
dependent_cameras_all: false,
};
const webrtcCardCameraConfigSchema = z.object({
entity: z.string().optional(),
@@ -405,6 +406,9 @@ const cameraConfigSchema = z
// Set of cameras IDs upon which this camera depends.
dependent_cameras: z.string().array().optional(),
dependent_cameras_all: z
.boolean()
.default(cameraConfigDefault.dependent_cameras_all),
trigger_by_motion: z.boolean().default(cameraConfigDefault.trigger_by_motion),
trigger_by_occupancy: z.boolean().default(cameraConfigDefault.trigger_by_occupancy),
@@ -1015,7 +1019,10 @@ const timelineConfigSchema = z
.max(24 * 60 * 60)
.optional()
.default(timelineConfigDefault.window_seconds),
show_recordings: z.boolean().optional().default(timelineConfigDefault.show_recordings),
show_recordings: z
.boolean()
.optional()
.default(timelineConfigDefault.show_recordings),
controls: z
.object({
thumbnails: thumbnailsControlSchema