CPU Temp gone?

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.

Gone?

It’s only gone from YAML. UI setup is still possible for the System Monitor.

This is an on-going process. Many YAML integrations will be moved to the UI. A lot will remain as YAML. Specifics are detailed here: The future of YAML - Home Assistant

It does not clean it for you but it does tell you what needs removing.

1 Like

Now you got CPU temperature provided by System Monitor, so the CPU temp command_line sensor may be excluded/commented in your config.
In some cases CPU temp is not provided by System Monitor (depends on a hardware probably), then you have to use command_line (like you did).

1 Like

I guess my confusion came in that there are 2 Entities here:

and one of them is called Binary Sensor (like how I had it named in the .yaml file). That .yaml file is completely commented out in configuration.yaml now, so I was wonder why the name still existed. I was using that sensor to give me this guage:

image

Looking at the documentation - looks like I can use it now for knowing when my cell phone is not pinging (i.e. Not At Home). :grinning:

Now to figure out if I still need these Heating and AC tracking sensors.

I have “The WATCHMAN” installed - I was just wondering if there was a “Maid” which could be installed to clean out the ‘junk’. LOL

Yeup - know from back when I started with HA - the AMD CPU on this HP T620 ThinClient would not show - after some conversations with the developers, and sending lots of logs and stuff - they got it working with those lines in the .yaml for CPU_Temp.