mirror of
https://forgejo.altau.su/lego/lego-monitoring.git
synced 2026-03-10 04:41: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":
|
case "nct6687":
|
||||||
# skipping first 8 elements as they're not informative
|
lables = {
|
||||||
# while the last elements duplicate the first ones,
|
"AMD TSI Addr 98h": "CPU",
|
||||||
# but with more understandable names
|
"Diode 0 (curr)": "System",
|
||||||
for sensor in sensors[7:-2:]:
|
"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(
|
temp_sensors[s_type].append(
|
||||||
TemperatureSensor(
|
TemperatureSensor(
|
||||||
sensor_type=s_type,
|
sensor_type=s_type,
|
||||||
sensor_label=sensor.label,
|
sensor_label=real_label,
|
||||||
current_temp=sensor.current,
|
current_temp=sensor.current,
|
||||||
highest_temp=sensor.high or None,
|
highest_temp=sensor.high or None,
|
||||||
critical_temp=sensor.critical or None,
|
critical_temp=sensor.critical or None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue