Improve recording retention logic (#20506)

* Change default event retention

* Update docs

* Handle both record and event record

* Catch edge case

* Undo motion change and improve motion behavior

* fix typo

* Remove record retention banner

* Remove unused

* Fix tests
This commit is contained in:
Nicolas Mowen
2025-10-15 11:09:28 -06:00
committed by GitHub
parent 3c8ef0c71c
commit e592c7044b
7 changed files with 95 additions and 118 deletions

View File

@@ -25,16 +25,16 @@ record:
alerts:
retain:
days: 30
mode: motion
mode: all
detections:
retain:
days: 30
mode: motion
mode: all
```
### Reduced storage: Only saving video when motion is detected
In order to reduce storage requirements, you can adjust your config to only retain video where motion was detected.
In order to reduce storage requirements, you can adjust your config to only retain video where motion / activity was detected.
```yaml
record:
@@ -53,7 +53,7 @@ record:
### Minimum: Alerts only
If you only want to retain video that occurs during a tracked object, this config will discard video unless an alert is ongoing.
If you only want to retain video that occurs during activity caused by tracked object(s), this config will discard video unless an alert is ongoing.
```yaml
record:

View File

@@ -537,7 +537,7 @@ record:
# Optional: Retention settings for recordings of alerts
retain:
# Required: Retention days (default: shown below)
days: 14
days: 10
# Optional: Mode for retention. (default: shown below)
# all - save all recording segments for alerts regardless of activity
# motion - save all recordings segments for alerts with any detected motion
@@ -557,7 +557,7 @@ record:
# Optional: Retention settings for recordings of detections
retain:
# Required: Retention days (default: shown below)
days: 14
days: 10
# Optional: Mode for retention. (default: shown below)
# all - save all recording segments for detections regardless of activity
# motion - save all recordings segments for detections with any detected motion