Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore attribute labels #506

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion custom_components/frigate/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
ATTR_CLIENT,
ATTR_CONFIG,
ATTR_COORDINATOR,
ATTRIBUTE_LABELS,
CONF_CAMERA_STATIC_IMAGE_HEIGHT,
DOMAIN,
FRIGATE_RELEASES_URL,
Expand Down Expand Up @@ -103,7 +104,8 @@ def get_cameras_and_objects(
camera_objects = set()
for cam_name, cam_config in config["cameras"].items():
for obj in cam_config["objects"]["track"]:
camera_objects.add((cam_name, obj))
if obj not in ATTRIBUTE_LABELS:
camera_objects.add((cam_name, obj))

# add an artificial all label to track
# all objects for this camera
Expand Down
5 changes: 5 additions & 0 deletions custom_components/frigate/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
ATTR_FAVORITE = "favorite"
ATTR_MQTT = "mqtt"

# Frigate Attribute Labels
NickM-27 marked this conversation as resolved.
Show resolved Hide resolved
# These are labels that are not individually tracked as they are
# attributes of another label. ex: face is an attribute of person
ATTRIBUTE_LABELS = ["amazon", "face", "fedex", "license_plate", "ups"]
dermotduffy marked this conversation as resolved.
Show resolved Hide resolved

# Configuration and options
CONF_CAMERA_STATIC_IMAGE_HEIGHT = "camera_image_height"
CONF_MEDIA_BROWSER_ENABLE = "media_browser_enable"
Expand Down