mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-09 20:31:10 +00:00
replace lables
This commit is contained in:
parent
630f3d0f91
commit
791176aae1
1 changed files with 11 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue