Monitoring RPI 5 fan speed in systemmonitor integration

Sorry, I’m new to Home Assistant as well as to Linux.
I have set up a Home Assistant in Container mode and using the System Monitor Integration.

I recently came across the following watch command which allows to monitor the PWM fan speed. Is it possible to integrate this into “System Monitor Integration”?

watch cat /sys/devices/platform/cooling_fan/hwmon/*/fan1_input

I use “System Monitor Integration” to monitor the Pi5 CPU temperature, so this request makes sense. In the meantime, you can monitor with the command line integration. I use the following in my configuration.yaml

command_line:
  - sensor:
      name: Pi5 Fan Speed
      unique_id: Pi5_fan_rpm
      scan_interval: 10
      command: 'cat /sys/devices/platform/cooling_fan/hwmon/*/fan1_input'
      unit_of_measurement: "RPM"
      value_template: "{{value}}" 
1 Like

what do i do if there’s no cooling_fan folder in the platform folder?

I’m not sure. I did a fresh install when I moved over to the Pi5 then restored from backup. If you just did a microSD swap, that could be the issue. I know the above instructions worked for at least 1 other person.