Fixes mypy errors by adding cleanup_old_recordings and
cleanup_recordings_loop to AmcrestServiceProtocol.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add configurable retention period for saved clips (default: 7 days).
Recordings older than the retention period are automatically deleted
once per day. Dangling symlinks are also cleaned up when their target
files are removed.
Configure via `media.retention_days` in config.yaml or
`MEDIA_RETENTION_DAYS` environment variable. Set to 0 to disable.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
these are no longer sensors themselves but attributes of the
motion sensor and they update when a change to motion happens
also, store_recording_in_media now returns the file name
instead of the full path
* Reworked publish.py and amcrest.py to emit single-payload MQTT device discovery blocks using "platform": "mqtt" and nested "cmps" for entities
* Simplified service entity publication (publish_service_discovery) into unified "device" payload
* Replaced component_type with platform throughout topics and interface definitions
* Refactored build_camera() to generate full per-camera device definition including all sensors, switches, and media links
* Updated publish_device_state() to support targeted subject/sub publishing
* Increased snapshot timeout and backoff (20s, 8s) for better camera stability
* Updated type handling in amcrest_api for network config parsing (cast from tuple or str)
* Bumped coverage dependency → 7.11.2 and refreshed json-logging-graystorm SHA
- Converted device initialization and state building to async coroutines
- Parallelized Amcrest camera connections using asyncio.gather
- Added clean_value() helper for tuple/list/string SDK outputs
- Added fallback for missing DefaultInterface in network config
- Improved error handling, timeouts, and type annotations
- Verified code quality (ruff, black, mypy all passing)