[modules/sensors] do not truncate temperature
use strip() instead of a sub-list to get the value for the temperature. fixes #787
This commit is contained in:
parent
7f03c9ce2d
commit
902288f30d
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ class Module(core.module.Module):
|
||||||
try:
|
try:
|
||||||
temperature = open(
|
temperature = open(
|
||||||
self.parameter("path", "/sys/class/thermal/thermal_zone0/temp")
|
self.parameter("path", "/sys/class/thermal/thermal_zone0/temp")
|
||||||
).read()[:2]
|
).read().strip()
|
||||||
log.debug("retrieved temperature from /sys/class/")
|
log.debug("retrieved temperature from /sys/class/")
|
||||||
# TODO: Iterate through all thermal zones to determine the correct one and use its value
|
# TODO: Iterate through all thermal zones to determine the correct one and use its value
|
||||||
# https://unix.stackexchange.com/questions/304845/discrepancy-between-number-of-cores-and-thermal-zones-in-sys-class-thermal
|
# https://unix.stackexchange.com/questions/304845/discrepancy-between-number-of-cores-and-thermal-zones-in-sys-class-thermal
|
||||||
|
|
Loading…
Reference in a new issue