Add person tracking for UniFi Protect (#111289)
This commit is contained in:
parent
72fe170dc8
commit
5890a7d38c
3 changed files with 20 additions and 0 deletions
|
@ -273,6 +273,15 @@ CAMERA_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
|
|||
ufp_value="is_glass_break_detection_on",
|
||||
ufp_perm=PermRequired.NO_WRITE,
|
||||
),
|
||||
ProtectBinaryEntityDescription(
|
||||
key="track_person",
|
||||
name="Tracking: Person",
|
||||
icon="mdi:walk",
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
ufp_required_field="is_ptz",
|
||||
ufp_value="is_person_tracking_enabled",
|
||||
ufp_perm=PermRequired.NO_WRITE,
|
||||
),
|
||||
)
|
||||
|
||||
LIGHT_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
|
||||
|
|
|
@ -298,6 +298,16 @@ CAMERA_SWITCHES: tuple[ProtectSwitchEntityDescription, ...] = (
|
|||
ufp_set_method="set_glass_break_detection",
|
||||
ufp_perm=PermRequired.WRITE,
|
||||
),
|
||||
ProtectSwitchEntityDescription(
|
||||
key="track_person",
|
||||
name="Tracking: Person",
|
||||
icon="mdi:walk",
|
||||
entity_category=EntityCategory.CONFIG,
|
||||
ufp_required_field="is_ptz",
|
||||
ufp_value="is_person_tracking_enabled",
|
||||
ufp_set_method="set_person_track",
|
||||
ufp_perm=PermRequired.WRITE,
|
||||
),
|
||||
)
|
||||
|
||||
PRIVACY_MODE_SWITCH = ProtectSwitchEntityDescription[Camera](
|
||||
|
|
|
@ -37,6 +37,7 @@ CAMERA_SWITCHES_BASIC = [
|
|||
not d.name.startswith("Detections:")
|
||||
and d.name != "SSH Enabled"
|
||||
and d.name != "Color Night Vision"
|
||||
and d.name != "Tracking: Person"
|
||||
)
|
||||
or d.name == "Detections: Motion"
|
||||
or d.name == "Detections: Person"
|
||||
|
|
Loading…
Add table
Reference in a new issue