From 9ee701c749b1eaa62e5a956097cd3063aaf9057e Mon Sep 17 00:00:00 2001 From: adam Date: Sat, 7 Mar 2026 05:19:21 +0000 Subject: [PATCH] Fix smart_supported detection for RAID controllers without SMART --- services/smart.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/smart.py b/services/smart.py index 4b250f0..c32d4e5 100644 --- a/services/smart.py +++ b/services/smart.py @@ -73,7 +73,9 @@ async def _run_smartctl(device: str) -> dict: def _parse_smart_json(device: str, data: dict) -> dict: """Extract relevant fields from smartctl JSON output.""" - result: dict = {"device": device, "smart_supported": True} + smart_support = data.get("smart_support", {}) + is_supported = smart_support.get("available", True) if smart_support else True + result: dict = {"device": device, "smart_supported": is_supported} # Identity — ATA vs SCSI field names result["model"] = data.get("model_name") or data.get("scsi_model_name")