From fe3cdebd178c8d6e6e9d7ef364cfd149fa08ac45 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sat, 23 Dec 2023 08:51:11 -0600 Subject: [PATCH] don't lowercase status strings --- frigate/ptz/onvif.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/frigate/ptz/onvif.py b/frigate/ptz/onvif.py index e56afe70c..a6495b6c7 100644 --- a/frigate/ptz/onvif.py +++ b/frigate/ptz/onvif.py @@ -538,18 +538,16 @@ class OnvifController: pan_tilt_status = getattr(status, "MoveStatus", None) # we're unsupported - if pan_tilt_status is None or pan_tilt_status.lower() not in [ - "idle", - "moving", + if pan_tilt_status is None or pan_tilt_status not in [ + "IDLE", + "MOVING", ]: logger.error( f"Camera {camera_name} does not support the ONVIF GetStatus method. Autotracking will not function correctly and must be disabled in your config." ) return - if pan_tilt_status.lower() == "idle" and ( - zoom_status is None or zoom_status.lower() == "idle" - ): + if pan_tilt_status == "IDLE" and (zoom_status is None or zoom_status == "IDLE"): self.cams[camera_name]["active"] = False if not self.ptz_metrics[camera_name]["ptz_motor_stopped"].is_set(): self.ptz_metrics[camera_name]["ptz_motor_stopped"].set()