I figured out how to create a piston to close the valve when the temp at certain sensors are below a certain value.
This article was great: