Added additional sensor for external temperature, improved heating/cooling logic