PID control for chamber temperature fan

Basic Information:

Printer Model: Voron2.4_350mm_Fluidd
MCU / Printerboard: BTT Octopus 1.1
klippy.log klippy.log (2.0 MB)

Describe your issue:

I have an additional chamber temperature sensor controlling temperature_fan if the temperature is above 35C or it can be also controlled adjusted using g-code. The problem with this setup is that the chamber is experiencing quick temperature changes that can affect the quality of print. I attempted to implement PID control but lack of coding knowledge makes the temperature_fan work as heater: if temperature is lower than target (35C) it turns on the fan. My goal is to reverse PID: if temperature is higher that the target => turn on (PID) the fan.
Can someone please tell me if it’s possible at all and if possible how to implement that?
Here is the part of the config:

[temperature_fan chamber]
pin: PD13
max_power: 1.0
shutdown_speed: 0.0
kick_start_time: 5.0
cycle_time:0.01
off_below:0.1
sensor_type: ATC Semitec 104GT-2
sensor_pin: PF5
min_temp: 0
max_temp: 70
target_temp: 35.0
control: watermark
#control: pid
#hardware_pwm: true
#pid_kp: 40.0
#pid_ki: 5.0
#pid_kd: 0.01
gcode_id: C

[gcode_macro M141]
gcode:
SET_TEMPERATURE_FAN_TARGET TEMPERATURE_FAN=chamber TARGET={params.S}