The Raspberry checks the temperatures and controls the water tank. If the water is too colt for the bathroom, heat it up. The raspberry has solid state relays to switch the heating elements and the pump.
DHT22 temperature & humidity sensor driven by a Raspberry Pi 2 running a Python script
Medida de temperatura ambiente con sensor ds18b20, conectado a ESP 8266 01, envío de datos mediante protocolo mqtt a cliente node-red corriendo en Raspberry pi, el broker mqtt corre tambien sobre la Raspberry