// Create a new thermostat and add it to the array
HeatmiserThermostat newThermostat = null;
switch(thermostatPacket.getModel()) {
case PRT:
case PRTE:
newThermostat = new HeatmiserPRT();
break;
case PRTHW:
newThermostat = new HeatmiserPRTHW();
break;
default: