CPU Temp gone?

I have this sensor on my HA since I started using this 2+ years ago (installed using the x86_64 on an HP T620 ThinClient). I just updated/updated to these:

  • Core2024.1.3
  • Supervisor2023.12.0
  • Operating System11.4
  • Frontend20240104.0

…and now I see this on my Dashboard:

image

There are also 2 warnings about other things I need to change … what are these and how do I get them working without the YAML?

image

Also – what is all this madness?

It shows you explicitly the error.
You got a wrong indentation in the 1st line.

That is odd — I do not recall removing the indent. I have put them back … and the errors are gone now. Thank You, but I still cannot get the CPU temp to show now - after the updates. It has worked for 2+ years.

image

How do I fix this ? Are they saying there is no longer a way to get stats on the hardware, etc.?

image

Have you reloaded command_line sensors (or rebooted HA) after you fixed the code?

This is related to system monitor integration, and you have issues with command_line integration.

What previous version of HA did you have installed before the latest update?

I completely REBOOTED the system after making the changes. Not just a restart of HA. Still giving no CPU temp.

I have had System Monitor for 2+ years – one of the first things I setup, as I wanted to be able to keep an eye on what the computer running HA was doing.

2023.11.4 - I believe. I did the CORE update and then the HA update - this past weekend. Had not checked all the dashboards until this AM when I saw that I had the PING YAML warning {above} and the SYSTEM MONITOR YAML warning {above}. That is when I noticed on my “info” dashboard that CPU temp had an error.

I asked about the previous version because a few months ago (2023.6) there was a change for command_line sensors which required fixing the corr. code by users. The old format for command_line was completely removed in 2023.12. So, have you fixed your code due to these changes?

This is binary_sesnor.yaml

# Being Depreciated in version 2024.6.0
  - platform: ping
    name: "CloudFlare DNS"
    host: 1.1.1.1
    count: 5
    scan_interval: 60

This is sensors.yaml

# System Monitor Sensors (23-Aug-2022)
  - platform: systemmonitor
    resources:
      - type: processor_use
#      - type: processor_temperature   <<< Does Not Work
      - type: memory_free
      - type: memory_use
      - type: disk_use_percent
        arg: /
      - type: disk_use
      - type: disk_free
      - type: last_boot
      - type: ipv4_address
        arg: enp2s0
      - type: ipv4_address
        arg: wlp1s0  
# IPv6 not fully supported in HA        
#      - type: ipv6_address
#        arg: enp2s0
      - type: throughput_network_in
        arg: enp2s0
      - type: throughput_network_out
        arg: enp2s0
#      - type: network_in
#        arg: enp2s0
#      - type: network_out
#        arg: enp2s0
#      - type: packets_in
#        arg: enp2s0
#     - type: packets_out
#        arg: enp2s0

# Lines below allow for Database Sensor (Size) to be collected (commented as of 2022.6, no longer needed)
#  - platform: sql
#    db_url: !secret mariadb_url
#    queries:
#      - name: DB_size
#        query: 'SELECT table_schema "database", Round(Sum(data_length + index_length) / 1048576, 2) "value" FROM information_schema.tables WHERE table_schema="homeassistant" GROUP BY table_schema;'
#        column: "value"
#        unit_of_measurement: MB

# Lines below added for Command Line (CPU Temp)
  - platform: command_line
    name: CPU Temperature
    command: "cat /sys/class/hwmon/hwmon0/temp1_input"
    # If errors occur, make sure configuration file is encoded as UTF-8
    unit_of_measurement: "°C"
    value_template: "{{ value | multiply(0.001) | round(1) }}"

Please do not post unrelated code.
You have issues with command_line, any PING related things is a different matter.
As well as system monitor.

This is from the configuration.yaml

# Section of "INCLUDES" to declutter the configuration.yaml
alexa: !include alexa.yaml
automation: !include automations.yaml
binary_sensor: !include binary_sensor.yaml
camera: !include cameras.yaml
google_assistant: !include google_home.yaml
http: !include https.yaml
#proxmoxve: !include proxmox.yaml
recorder: !include maria-db.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
# Commented next line - depreciated in future vesion
sensor: !include sensors.yaml
template: !include templates.yaml
zone: !include zones.yaml

No Idea what I have to change… someone from the old DISCORD helped me create that code for the CPU temp.

This code is deprecated for a few months.
There are plenty of command_line-related threads here with solutions.
Search for “command_line” pattern.
Like this thread.

1 Like

I think the first sentence is badly worded. It has not been “removed”. It has been moved to the UI rather than using YAML.

bda2c6c77978c269ca1199b668e40d9bc9a0cf3b

It has been moved to the UI. You can find it in Settings → Devices & Services. Confirm it is there then delete the yaml for system monitor and restart.

There should also be a processor temperature entity in this integration you can enable instead of using the command line.

and it is fixed…

Created a

command_line.yaml

  - sensor:
      name: CPU Temperature
      command: "cat /sys/class/hwmon/hwmon0/temp1_input"
      unit_of_measurement: "°C"
      value_template: "{{ value | multiply(0.001) | round(1) }}"

Then commented out the old lines in the sensor.yaml - and updated configuration.yaml to !include the new file.

image

What specifically am I looking for in Devices & Services?

I tried to find these…but my ‘INFO’ page in my dashboards are still working, even with the sensors.yaml commented out in the configuration.yaml.

Yes, because as the repair says it has been “imported into the UI automatically” for you.

Look in Settings → Devices & Services:

Screenshot 2024-01-17 at 10-52-56 Settings – Home Assistant

Find this entity and click it

Click the cog icon at the top of the pop-up card

Untitled

Enable the entity and update:

You should then have a sensor.processor_temperature you can use. If you delete your existing CPU temperature sensor you can edit the entity id of the new sensor (in that last picture) to match the old sensor entity id so you don’t have to change your automations or dashboards.

Thank you @Ildar_Gabdullin

Appreciate the quick assistance. It appears a lot has changed since I had the time to play with HA.

1 Like

Thank You @tom_l

I see it now - it was kinda buried at the bottom. I will investigate what all is in there.

How long before this will be gone? Looks like I still have some entries:

I am guessing that one came from the binary_sensor.yaml which is now commented out in configuration.yaml

:question:Is there some kind of tool to clean (like a defrag on a PC) old stuff? If you install an integration and then remove it - does it “ALL” go away, not parts left over?

You guys are awesome… Enabled, and looking to change the guage. How do I make it Degrees Celsius?

Nevermind - I found it - Had to go the Sensor.