Ideal thermostat