diff --git a/hwmonDaemon.py b/hwmonDaemon.py index c985e94..7a247e3 100644 --- a/hwmonDaemon.py +++ b/hwmonDaemon.py @@ -2574,10 +2574,10 @@ class SystemHealthMonitor: temp_str = line.split(':')[1].strip() if ':' in line else line.strip() logger.debug(f"Raw temperature string: {temp_str}") - # Extract first temperature value more safely - digits = ''.join(c for c in temp_str if c.isdigit()) - if len(digits) >= 2: - temp_value = int(digits[:2]) + # Extract the first complete number from temperature string + temp_match = re.search(r'(\d+)', temp_str) + if temp_match: + temp_value = int(temp_match.group(1)) logger.debug(f"Parsed temperature value: {temp_value}") # Set both temperature fields