mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
High/critical temperatures may be 0.
This commit is contained in:
parent
b9d79d5440
commit
cb64194b9d
1 changed files with 7 additions and 0 deletions
|
|
@ -115,7 +115,14 @@ def get_cpu_info_psutil() -> CPUInfo:
|
|||
high_temperature = int(temp.get(name)[0].high or 0)
|
||||
critical_temperature = int(temp.get(name)[0].critical or 0)
|
||||
|
||||
# Temperatures my not exist.
|
||||
if not high_temperature:
|
||||
high_temperature = 60
|
||||
if not critical_temperature:
|
||||
critical_temperature = 95
|
||||
|
||||
if high_temperature and high_temperature == critical_temperature:
|
||||
# Display yellow warning before red warning.
|
||||
high_temperature = critical_temperature - 25
|
||||
|
||||
info = CPUInfo(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue