Electronic thermostats intended for heating or cooling with built-in sensor and input for an external sensor