Add support for animal detection in unifiprotect (#116290)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
William Taylor 2024-06-11 01:16:36 +10:00 committed by GitHub
parent 52379ad7cb
commit 30fab7b807
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 43 additions and 12 deletions

View file

@ -175,6 +175,15 @@ CAMERA_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
ufp_value="is_vehicle_detection_on",
ufp_perm=PermRequired.NO_WRITE,
),
ProtectBinaryEntityDescription(
key="smart_animal",
name="Detections: Animal",
icon="mdi:paw",
entity_category=EntityCategory.DIAGNOSTIC,
ufp_required_field="can_detect_animal",
ufp_value="is_animal_detection_on",
ufp_perm=PermRequired.NO_WRITE,
),
ProtectBinaryEntityDescription(
key="smart_package",
name="Detections: Package",
@ -453,6 +462,15 @@ EVENT_SENSORS: tuple[ProtectBinaryEventEntityDescription, ...] = (
ufp_enabled="is_vehicle_detection_on",
ufp_event_obj="last_vehicle_detect_event",
),
ProtectBinaryEventEntityDescription(
key="smart_obj_animal",
name="Animal Detected",
icon="mdi:paw",
ufp_value="is_animal_currently_detected",
ufp_required_field="can_detect_animal",
ufp_enabled="is_animal_detection_on",
ufp_event_obj="last_animal_detect_event",
),
ProtectBinaryEventEntityDescription(
key="smart_obj_package",
name="Package Detected",