Tracking, monitoring host RPI CPU temperature with Home Assistant
Most Linux systems give you the current temperature of the CPU when you read the file. /sys/class/thermal/thermal_zone0/temp
You will get a single line of text with the temperature as an Integer. So you have to divide the result by 1000 to get the temperature in °C
Knowing this we can make a command_line sensor in HomeAssistant
FYI: I needed this to evaluate my passive cooling PI case
command_line:
- sensor:
name: CPU Temperature
command: "cat /sys/class/thermal/thermal_zone0/temp"
# If errors occur, make sure configuration file is encoded as UTF-8
unit_of_measurement: "°C"
value_template: "{{ value | multiply(0.001) | round(1) }}"
Reload home assistant after the addition to the config


