Have you seen this app, it has an option to control the thermostat mode based on an outside temp sensor.