The ESP8266 dissipates enough heat to skew my thermostat reading by almost 2 degrees Celsius, which is no fun.
I thought of beforehand and added a foam pad between the back of the thermostat and the Wemos board; this was however not enough.
You can't really see the pad on the picture but if you look at the wires you can see that they are not flush with the back of the thermostat PCB. The yellow heatshrink tube on the left is a voltage regulator, but it does not generate comparable heat.
The solution I am trying is to put the whole thing behind the wall mounting plate, so literally inside the wall (I have brick and mortar walls). For this to be a bit more maintainable, I soldered a connector to the thermostat.
It's not a hack if you did not use the hot melt glue gun.