From 35360787c1c8e12dfc33fcee3f19db172fe98df2 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 22 Sep 2024 17:25:01 -0500 Subject: [PATCH] try deleting zoom spaces if disabled --- frigate/ptz/onvif.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py index 3332643b7c..694195f109 100644 --- a/frigate/ptz/onvif.py +++ b/frigate/ptz/onvif.py @@ -207,7 +207,13 @@ def _init_onvif(self, camera_name: str) -> bool: "RelativeZoomTranslationSpace" ][zoom_space_id]["URI"] else: - move_request.Translation.Zoom = [] + if "Zoom" in move_request["Translation"]: + del move_request["Translation"]["Zoom"] + if "Zoom" in move_request["Speed"]: + del move_request["Speed"]["Zoom"] + logger.debug( + f"{camera_name}: Relative move request after deleting zoom: {move_request}" + ) except Exception: self.config.cameras[ camera_name