fix: reduce log noise and guard against non-dict SNMP devices

- SNMP scheduler: skip non-dict entries in devices list (prevents AttributeError)
- UPS scheduler: downgrade NutError from exception to warning (expected when NUT not running)
- UniFi scheduler: downgrade login/poll failures from exception to warning (expected when controller unreachable)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-23 17:38:24 -04:00
parent 9e34d8d739
commit d9886e8680
3 changed files with 86 additions and 8 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ async def _do_poll(app: "Quart") -> None:
try:
raw_vars = await client.get_vars(cfg.get("ups_name", "ups"))
except NutError:
logger.exception("UPS poll failed")
except NutError as exc:
logger.warning("UPS poll failed: %s", exc)
return
parsed = parse_status(raw_vars)