Extend smartcam detection support (#1552)

New detection added with tests:

- bark detection
- glass detection
- line crossing detection
- meow detection
- vehicle detection
This commit is contained in:
Gabriele Pongelli
2025-08-25 15:20:33 +02:00
committed by GitHub
parent e21ab90e96
commit 0cd0434160
23 changed files with 1549 additions and 379 deletions

View File

@@ -0,0 +1,24 @@
"""Implementation of line crossing detection module."""
from __future__ import annotations
import logging
from kasa.smartcam.detectionmodule import DetectionModule
_LOGGER = logging.getLogger(__name__)
class LineCrossingDetection(DetectionModule):
"""Implementation of line crossing detection module."""
REQUIRED_COMPONENT = "linecrossingDetection"
QUERY_GETTER_NAME = "getLinecrossingDetectionConfig"
QUERY_MODULE_NAME = "linecrossing_detection"
QUERY_SECTION_NAMES = "detection"
DETECTION_FEATURE_ID = "line_crossing_detection"
DETECTION_FEATURE_NAME = "Line crossing detection"
QUERY_SETTER_NAME = "setLinecrossingDetectionConfig"
QUERY_SET_SECTION_NAME = "detection"