Someone smarter than I will have to answer this for you but there is an answer. It's called a temperature mixing valve. I have no idea how to plum it in but I have seen it done here by others. Just stick around for a while. A smart person will come along and save the day.