Use pre capture for custom events

This commit is contained in:
Nick Mowen 2023-07-05 06:31:07 -06:00
parent 12d4a47e3d
commit ad01b2653d

View File

@ -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,