Fix the spare/lifetime calculation, will need more robust logic later
This commit is contained in:
6
disk.py
6
disk.py
@@ -95,9 +95,6 @@ def parse_smart_data(data, device_node, rotation):
|
||||
if disk_type == "SSD":
|
||||
is_life_attr = False
|
||||
|
||||
# ID 231: SSD_Life_Left (Normalized value is %)
|
||||
if id_ == 231: is_life_attr = True
|
||||
|
||||
# ID 202: Percent_Lifetime_Remain
|
||||
if id_ == 202: is_life_attr = True
|
||||
|
||||
@@ -107,6 +104,9 @@ def parse_smart_data(data, device_node, rotation):
|
||||
# ID 233: Only if name is NOT "writes" (Avoids collision with Flash_Writes_GiB)
|
||||
if id_ == 233 and 'write' not in name: is_life_attr = True
|
||||
|
||||
# ID 231: SSD_Life_Left (Normalized value is %)
|
||||
if id_ == 231: is_life_attr = True
|
||||
|
||||
if is_life_attr and norm_val is not None:
|
||||
spare = f"{norm_val}%"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user