Changed the code to use setThermostatSettings instead of iterateThermostatId