Water Pressure PID Controller

I would like to make a PID controller to control the water pressure in a pipe. The system will have a valve and a pressure transducer.

Can we use the ESPHome PID Climate for that? How can we control the valve?