Add Reolink Ai person type, vehicle type and animal type (#153170)

This commit is contained in:
starkillerOG
2025-09-29 15:39:29 +02:00
committed by GitHub
parent 76cb4d123a
commit 89c5d498a4
4 changed files with 77 additions and 0 deletions

View File

@@ -185,6 +185,17 @@ def _init_host_mock(host_mock: MagicMock) -> None:
host_mock.baichuan.smart_ai_index.return_value = 1
host_mock.baichuan.smart_ai_name.return_value = "zone1"
def ai_detect_type(channel: int, object_type: str) -> str | None:
if object_type == "people":
return "man"
if object_type == "dog_cat":
return "dog"
if object_type == "vehicle":
return "motorcycle"
return None
host_mock.baichuan.ai_detect_type = ai_detect_type
@pytest.fixture
def reolink_host_class() -> Generator[MagicMock]: