To have my house ventilation on max speed when taking a shower, I used a [W1401 thermostat](https://aliexpress.com/item/32801482651.html) taped to my hot water pipe.
It switches a contact in the house fan.
When I take a shower, the hot water pipe rapidly heats and the fan switches to high setting, preventing the mirror to fog.
It takes 10 minutes for the pipe to cool, so the fan continues to remove moist air to dry the bathroom.
The thermostat was picked because it can be used to switch on high temperature ("cooling") and has adjustable hysteresis (which I can use to set the running time of the fan when the pipe cools).
Source files on [Github](https://github.com/koen-lee/OpenSCAD-designs/tree/master/W1401%20Thermostat%20housing)