nvme temp fix?

This commit is contained in:
2025-03-03 20:18:06 -05:00
parent 04c1dc59ce
commit 862e125cc6

View File

@ -840,7 +840,10 @@ class SystemHealthMonitor:
) )
for line in nvme_result.stdout.split('\n'): for line in nvme_result.stdout.split('\n'):
if 'temperature' in line.lower(): if 'temperature' in line.lower():
smart_health['temp'] = int(line.split(':')[1].strip().split()[0]) 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 break
except Exception as e: except Exception as e: