OrangePi CPU temperature

i am using orangePi prime to run hassio. i tried to display the cpu temperature using the command line sensor platform but it is not successfull. the following is my config

  • platform: command_line
    name: CPU Temperature
    command: “cat /sys/devices/virtual/thermal/thermal_zone1/temp”
    unit_of_measurement: “°C”

I hope somebody can help me solve this

Here’s what i use on my Orange Pi PC+.

- platform: command_line
  name: Home Assistant CPU Temp
  command: "echo $((`cat /sys/class/thermal/thermal_zone0/temp|cut -c1-2`)).$((`cat /sys/class/thermal/thermal_zone0/temp|cut -c3-4`))"
  unit_of_measurement: "°C"
  value_template: '{{ value }}'
  scan_interval: 300
2 Likes

tried this but all that i get is 0.0 C
any advises?

are you running hassio or home assistant?

you need to find the file where the temp is stored then

i’m running armbian on my orange pi pc+

i am using hassio so i dont know where the temp value is stored.

any luck with this sorry? i am in the same situation. switched from Raspberry pi 3 but to be honest dont feel too much of a difference. in RPI3 i had a fan which i controlled with GPIO platform based on CPU temperature. trying to replicate that for Orange Pi Prime

tried a bit with the help of expert…but no luck…have opened a issue in github…still no response yet…one thing i found out is that there is thermal element in docker but hassio is not reading it.

1 Like

This works for me on Orange PI One. Thank you!