mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Add person tracking for UniFi Protect (#111289)
This commit is contained in:
parent
72fe170dc8
commit
5890a7d38c
@ -273,6 +273,15 @@ CAMERA_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
|
|||||||
ufp_value="is_glass_break_detection_on",
|
ufp_value="is_glass_break_detection_on",
|
||||||
ufp_perm=PermRequired.NO_WRITE,
|
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, ...] = (
|
LIGHT_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
|
||||||
|
@ -298,6 +298,16 @@ CAMERA_SWITCHES: tuple[ProtectSwitchEntityDescription, ...] = (
|
|||||||
ufp_set_method="set_glass_break_detection",
|
ufp_set_method="set_glass_break_detection",
|
||||||
ufp_perm=PermRequired.WRITE,
|
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](
|
PRIVACY_MODE_SWITCH = ProtectSwitchEntityDescription[Camera](
|
||||||
|
@ -37,6 +37,7 @@ CAMERA_SWITCHES_BASIC = [
|
|||||||
not d.name.startswith("Detections:")
|
not d.name.startswith("Detections:")
|
||||||
and d.name != "SSH Enabled"
|
and d.name != "SSH Enabled"
|
||||||
and d.name != "Color Night Vision"
|
and d.name != "Color Night Vision"
|
||||||
|
and d.name != "Tracking: Person"
|
||||||
)
|
)
|
||||||
or d.name == "Detections: Motion"
|
or d.name == "Detections: Motion"
|
||||||
or d.name == "Detections: Person"
|
or d.name == "Detections: Person"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user