From 791176aae11e061d1637827aac42915fc81cd5f5 Mon Sep 17 00:00:00 2001 From: saqriphnix Date: Sat, 27 Jul 2024 19:43:50 +0300 Subject: [PATCH] replace lables --- misc/sensors.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/misc/sensors.py b/misc/sensors.py index c6d55bd..b1b3f1b 100644 --- a/misc/sensors.py +++ b/misc/sensors.py @@ -67,14 +67,20 @@ class Sensors: ) ) case "nct6687": - # skipping first 8 elements as they're not informative - # while the last elements duplicate the first ones, - # but with more understandable names - for sensor in sensors[7:-2:]: + lables = { + "AMD TSI Addr 98h": "CPU", + "Diode 0 (curr)": "System", + "Thermistor 15": "VRM MOSFET", + "Thermistor 1": "Platform Controller Hub (Peripherals)", + "Thermistor 16": "CPU Socket", + } + + for sensor in sensors[:-2]: + real_label = lables[sensor.label] temp_sensors[s_type].append( TemperatureSensor( sensor_type=s_type, - sensor_label=sensor.label, + sensor_label=real_label, current_temp=sensor.current, highest_temp=sensor.high or None, critical_temp=sensor.critical or None,