From 5b15a75145765fd26551f1ba7dc1666ac68dd21b Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 28 Feb 2024 15:06:30 -0700 Subject: [PATCH] Fix movement weights type --- frigate/config.py | 2 +- frigate/test/test_config.py | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frigate/config.py b/frigate/config.py index 8ddc7b65f..71e12f778 100644 --- a/frigate/config.py +++ b/frigate/config.py @@ -189,7 +189,7 @@ class PtzAutotrackConfig(FrigateBaseModel): timeout: int = Field( default=10, title="Seconds to delay before returning to preset." ) - movement_weights: Optional[Union[str, List[str]]] = Field( + movement_weights: Optional[Union[str, List[float]]] = Field( default=[], title="Internal value used for PTZ movements based on the speed of your camera's motor.", ) diff --git a/frigate/test/test_config.py b/frigate/test/test_config.py index 94863709c..b14550cf4 100644 --- a/frigate/test/test_config.py +++ b/frigate/test/test_config.py @@ -83,6 +83,7 @@ class TestConfig(unittest.TestCase): }, "openvino": { "type": "openvino", + "model": {"path": "/openvino_model.xml"} }, }, # needs to be a file that will exist, doesnt matter what @@ -1534,11 +1535,11 @@ class TestConfig(unittest.TestCase): runtime_config = frigate_config.runtime_config() assert runtime_config.cameras["back"].onvif.autotracking.movement_weights == [ - "0.0", - "1.0", - "1.23", - "2.34", - "0.5", + 0.0, + 1.0, + 1.23, + 2.34, + 0.5, ] def test_fails_invalid_movement_weights(self):