Closed amse2000 closed 1 month ago
The cpu temp command don't work properly under Ubuntu,
It returns many values like this:
awk '{printf ("%.2f",$1/1000); }' /sys/class/thermal/thermal_zone*/temp
57.0020.0026.8526.8526.8526.8560.0060.00
I'll do a fix for the cpu temp - based on your idea, that works with Ubuntu, pls submit this PR w/o it.
Your fix is also running on my pi: awk '{ printf ("%.2f\n", $1/1000); }' $(for zone in /sys/class/thermal/thermal_zone*/; do grep -iq "cpu" "${zone}type" && echo "${zone}temp"; done) 54.77
I just added some more device_classes and changed the way to resolve CPU-Temperature, this works on my Raspi 3 Model B (locale DE) maybe this solves #132 Please check on different systems/hardware.