From ad01b2653d915ed86b46907dd3f8ed215e0881a7 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Wed, 5 Jul 2023 06:31:07 -0600 Subject: [PATCH] Use pre capture for custom events --- frigate/events/external.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frigate/events/external.py b/frigate/events/external.py index 20456b9cb..fed33b0f7 100644 --- a/frigate/events/external.py +++ b/frigate/events/external.py @@ -57,8 +57,8 @@ class ExternalEventProcessor: "label": label, "sub_label": sub_label, "camera": camera, - "start_time": now, - "end_time": now + duration if duration is not None else None, + "start_time": now - camera_config.record.events.pre_capture, + "end_time": now + duration + camera_config.record.events.post_capture if duration is not None else None, "thumbnail": thumbnail, "has_clip": camera_config.record.enabled and include_recording, "has_snapshot": True,