Basic RPi CPU temp not showing up, no errors

i have spent last 2 hours trying to add this simple sensor… i have read several published documents and others findings but still cant make it work. just unclear whats wrong. I am able to reload the YAML with no error but the sensor never shows up when i go to developer states where i see all the other sensors. i mean its not even there, not that it is not reading anything it just doesnt exist.

grateful to any help anyone can give

this is found in my main config file.

i have tried the command line in quotes and without quotes.

command_line:
  - sensor:
      name: CPU Temp
      command: 'cat /sys/class/thermal/thermal_zone0/temp'
      unit_of_measurement: "°C"
      value_template: "{{ value | multiply(0.001) | round(2) }}"
  #sensor:
    #- name: "CPU Temperature"
      #platform: command_line
      #command: "cat /sys/class/thermal/thermal_zone0/temp"
      #unit_of_measurement: "°F"
      #value_template: "{{ value | multiply(0.001) | multiply(1.8) | round(1) | float + 32}}"      type or paste code here

Have you tried the System Monitor integration? That’s how I pull in my temp for a Pi.

2 Likes

i looked there and would swear there wasnt tempiture. but sure enough its there. will try that now.

ok so i have it loaded in my config file and it loads fine but again i dont see the sensor? i should be able to see it just as any other sensor correct?

pasted where i have it in, its at the bottom. all the other sensors work. apricate your time looking at it.


sensor:
  - platform: template
    sensors:
      forecast_current_temperature:
        unique_id: forecast_current_temperature
        friendly_name: Outside temperature
        unit_of_measurement: °F
        device_class: temperature
        value_template: "{{ state_attr('weather.forecast_home', 'temperature') }}"
      #forecast_current_temperature_hourly: # testing to see if it gets more freq updates
        #unique_id: forecast_current_temperature_hourly
        #friendly_name: Outside temperature (hourly)
        #unit_of_measurement: °F
        #device_class: temperature
        #value_template: "{{ state_attr('weather.forecast_home_hourly', 'temperature') }}"
      forecast_current_humidity:
        unique_id: forecast_current_humidity
        friendly_name: Outside humidity
        unit_of_measurement: "%"
        device_class: humidity
        value_template: "{{ state_attr('weather.forecast_home', 'humidity') }}"
      forecast_current_pressure:
        unique_id: forecast_current_pressure
        friendly_name: Outside air pressure
        unit_of_measurement: inHg
        device_class: pressure
        value_template: "{{ state_attr('weather.forecast_home', 'pressure') }}"
      forecast_current_wind_speed:
        unique_id: forecast_current_wind_speed
        friendly_name: Outside wind speed
        unit_of_measurement: mph
        device_class: wind_speed
        value_template: "{{ state_attr('weather.forecast_home', 'wind_speed') }}"
      forecast_current_wind_bearing:
        unique_id: forecast_current_wind_bearing
        friendly_name: Outside wind bearing
        unit_of_measurement: "°"
        icon_template: mdi:compass
        value_template: "{{ state_attr('weather.forecast_home', 'wind_bearing') }}"
  - platform: systemmonitor
    resources:
      - type: disk_use_percent
        arg: /config
      - type: memory_free
      - type: processor_temperature

do you recall needing to do a reboot or anything?

yes, wow i just cant read today…

After restarting Home Assistant, these sensors will show up and update their information every 15 seconds.