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)
- Rewrote MQTT handling with reconnect, structured logging, and Home Assistant re-discovery triggers
- Introduced modular mixins (`helpers`, `mqtt`, `amcrest_api`) for cleaner architecture
- Replaced `util.py` with internal mixin helpers and `to_gb()` conversions
- Added new `event_text` and `event_time` sensors (with `device_class: timestamp`)
- Added support for doorbell and human-detection binary sensors
- Improved reconnect logic, last-will handling, and clean shutdown on signals
- Overhauled device discovery and state publishing to use unified upsert logic
- Simplified event handling and privacy mode inference from motion/human/doorbell events
- Introduced `tools/clear_mqtt.sh` for quick topic cleanup
- Added full pyproject.toml with lint/test/dev config (Black, Ruff, Pytest)
- Embedded full metadata and image labels in Docker build
BREAKING CHANGE:
Project layout moved to `src/amcrest2mqtt/`, internal class and import paths changed.
Users must update configs and volumes to the new structure before deploying.