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 <noreply@anthropic.com>
pull/106/head
Jeff Culverhouse 6 days ago
parent 3847c75945
commit 4d7e630c21

@ -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}")

Loading…
Cancel
Save