Skip to content

Commit

Permalink
fix motion and object schema for cameras
Browse files Browse the repository at this point in the history
  • Loading branch information
roflcoopter committed Sep 4, 2020
1 parent c59a4d8 commit 315e0fd
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/lib/config/config_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,22 @@ def get_codec() -> str:
): check_for_hwaccels,
Optional("codec", default=get_codec()): str,
Optional("filter_args", default=[]): list,
Optional("motion_detection", default=None): {
Optional("interval"): int,
Optional("trigger"): bool,
Optional("timeout"): bool,
Optional("width"): int,
Optional("height"): int,
Optional("area"): int,
Optional("frames"): int,
},
Optional("object_detection", default=None): {
Optional("interval"): int,
Optional("labels"): LABELS_SCHEMA,
},
Optional("motion_detection", default=None): Any(
{
Optional("interval"): int,
Optional("trigger"): bool,
Optional("timeout"): bool,
Optional("width"): int,
Optional("height"): int,
Optional("area"): int,
Optional("frames"): int,
},
None,
),
Optional("object_detection", default=None): Any(
{Optional("interval"): int, Optional("labels"): LABELS_SCHEMA,},
None,
),
}
],
ensure_mqtt_name,
Expand Down

0 comments on commit 315e0fd

Please sign in to comment.