NUC Temperature on HassOS

Hello,
how can I get CPU temperature of my NUC with i5-7260U?
cat /sys/class/thermal/thermal_zone1/temp shows correct RAM temperature (acordning to BIOS)
cat /sys/class/thermal/thermal_zone0/temp shows -263200
I installed lm-sensors package and it shows: Apapter: ACPI interace; temp1: -263.2°C

Thank you.

did sensors-detect find anything?

Nope. It seems like sensor-detect in not included in this Alpine Linux package version of lm-sensors.

For me this is working (it’s a Intel NUC* BOXNUC6CAYH):

  - platform: command_line
    name: NUC CPU Temperature Core Zone 0
    command: "cat /sys/devices/virtual/thermal/thermal_zone0/temp"
    value_template: '{{ value | multiply(0.001) | round(2) }}'
    unit_of_measurement: '°C'
  - platform: command_line
    name: NUC CPU Temperature Core Zone 2
    command: "cat /sys/devices/virtual/thermal/thermal_zone2/temp"
    value_template: '{{ value | multiply(0.001) | round(2) }}'
    unit_of_measurement: '°C'
3 Likes

This works for me as well but thermal_zone0 shows -263200 which is not right. And I have only Zone0 and Zone1. :confused:

Maybe you check first how many thermal zones your cpu will provide:

ls -1 /sys/class/thermal/thermal_zone*/type | xargs -I % sh -c "echo % ; cat %"

The output can look like this:

/sys/class/thermal/thermal_zone0/type
acpitz
/sys/class/thermal/thermal_zone1/type
acpitz
/sys/class/thermal/thermal_zone2/type
x86_pkg_temp

x86_pkg_temp is the zone which provides temp. data.

3 Likes

I have zone0 and zone1. It seems like thermal_zone1 is x86_pkg_temp and it shows 51°C.
I am confused now. In BIOS, CPU temp was about 65°C and RAM temp was about 50°C. That’s why I thought zone1 is RAM and not CPU… :worried: