Ability to configure min frames for zone presence (#6680)

* Objects need to be in zones multiple times to be considered present in the zone

* Add a field to configure inertia per zone

* Formatting

* Use correct default method

* Clarify zone presence behavior

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>

---------

Co-authored-by: Blake Blackshear <blakeb@blakeshome.com>
This commit is contained in:
Nicolas Mowen
2023-06-11 07:00:53 -06:00
committed by GitHub
parent fd6eb78f41
commit b160abac0d
3 changed files with 25 additions and 5 deletions

View File

@@ -330,6 +330,12 @@ class ZoneConfig(BaseModel):
coordinates: Union[str, List[str]] = Field(
title="Coordinates polygon for the defined zone."
)
inertia: int = Field(
default=3,
title="Number of consecutive frames required for object to be considered present in the zone.",
gt=0,
le=10,
)
objects: List[str] = Field(
default_factory=list,
title="List of objects that can trigger the zone.",