From 862e125cc697d873c6c7ed01c2ae27e23de4b322 Mon Sep 17 00:00:00 2001 From: Jared Vititoe Date: Mon, 3 Mar 2025 20:18:06 -0500 Subject: [PATCH] nvme temp fix? --- hwmonDaemon.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hwmonDaemon.py b/hwmonDaemon.py index 1c154b6..594795c 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -840,8 +840,11 @@ class SystemHealthMonitor: ) for line in nvme_result.stdout.split('\n'): if 'temperature' in line.lower(): - smart_health['temp'] = int(line.split(':')[1].strip().split()[0]) - break + temp_str = line.split(':')[1].strip() + # Extract numeric temperature value + temp_value = int(''.join(filter(str.isdigit, temp_str))) + smart_health['temp'] = temp_value + break except Exception as e: smart_health['status'] = 'ERROR'