Understanding Climate Pid and Output Component (3 speed fan)

Hi,

I’ve built a ESP32 with a temp/hum sensor and 4 relays to control an HVAC that has 4 outputs:

  1. Valve (cool or heat depends on the season)
  2. Fan speed 1
  3. Fan speed 2
  4. Fan speed 3

I don’t need to control the valve as i don’t want the fan to work without hot or cold air.

I wanted to use PID Climate component to determine which speed is better to get to the target temperature but i still can’t understand how Output Component works and how to link it to the 3 speeds. (Speed fan component)
Obviously i can’t even test the pid.autotuning before i can control the fans so i’m kinda stuck in a loop

I have now configured it as an input number and i control the on/off states of the relays via template.
Is there a way to do this?

Thank you very much.