I figured it out whist trying to get the full speed from my NMVe…
I will try to explain as best I can.
First I hooked the pi 5 (running Home assistant OS) to my PC monitor. Let it boot up and you get the command line.
type login
then type vi mnt/boot/config.txt
scroll all the way to the bottom where it says all (you have to change to insert mode on keyboard, on my keyboard this was Fn Delete, but I guess they are all different).
When you are ready… These are the settings I have used. this means at 35c the fan will run at 175 until temp drops 5c. I have played with this a lot over the last few days, this I found keeps my pi5 around 35c all the time with very little to no fan noise
dtparam=fan_temp0=35000
dtparam=fan_temp0_hyst=5000
dtparam=fan_temp0_speed=175
Once you have typed in the above you need to press ESC on keyboard then type :wq this saves the file… Reboot and new settings should take effect. I will post screen grabs in the morning.