Generic thermostat configuration and PWM fan control

Hi all guys,

I have purchased the Argon mini fan for my Raspi4 (manufacturer web page here). The fan works great thanks to the integrated heat sink and is very quiet (comparable to my old Noctua fan), let’s see on the long run.

The fan can be switched to OFF/ON/PWM mode using a 3-position switch. ON and OFF are self explanatory, in PWM the fan can be controlled by means of Raspi pin 18.

I was able to configure a generic thermostat in my configuration.yaml as follows:

# CPU cooling control   
  - platform: rpi_gpio
      18: RPI Cooling Fan
  - platform: generic_thermostat
    name: CPU temperature control
    heater: switch.rpi_cooling_fan
    target_sensor: sensor.processor_temperature
    min_temp: 30
    max_temp: 70
    ac_mode: true
    target_temp: 55
    cold_tolerance: 0
    hot_tolerance: 0
      minutes: 3
      minutes: 5
    initial_hvac_mode: "cool"

And I am able to have this thermostat shown on Lovelace


Now my questions:

  1. I would expect the fan to run at least 3 minutes once the CPU reaches target temperature, but the behaviour looks unpredictable
  2. Is there a way to set two thresholds, having the fan started at the higher one and stopped at the lower, so to have the CPU always running in this range?
  3. Is there a way to control fan speed with PWM? I would take advantage of this possibility.

I am running HA OS latest release on Raspberry Pi4, 8GB.

Thank you for your support!


1 Like

hello, i have also an Argon mini. did you find the solution for you problem?