From 4d7e630c21d0279d0a28df8b5ca4f49fa3afcb8b Mon Sep 17 00:00:00 2001 From: Jeff Culverhouse Date: Tue, 27 Jan 2026 13:36:09 -0500 Subject: [PATCH] chore: reduce log noise for cameras without SD card Change storage stats CommError from error to debug level since 400 Bad Request just means the camera has no SD card - not an actual error. Co-Authored-By: Claude Opus 4.5 --- src/amcrest2mqtt/mixins/amcrest_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amcrest2mqtt/mixins/amcrest_api.py b/src/amcrest2mqtt/mixins/amcrest_api.py index 73656b9..c68a7d9 100644 --- a/src/amcrest2mqtt/mixins/amcrest_api.py +++ b/src/amcrest2mqtt/mixins/amcrest_api.py @@ -209,7 +209,8 @@ class AmcrestAPIMixin: try: storage = cast(dict, await device["camera"].async_storage_all) except CommError as err: - self.logger.error(f"failed to get storage stats from ('{self.get_device_name(device_id)}'): {err!r}") + # 400 Bad Request typically means no SD card - not an error, just no storage + self.logger.debug(f"no storage stats from '{self.get_device_name(device_id)}' (no SD card?): {err!r}") return current except LoginError as err: self.logger.error(f"failed to auth to ('{self.get_device_name(device_id)}'): {err!r}")