def registerThermostat(self, thermostat):
try:<EOL><INDENT>type(thermostat) == heatmiser.HeatmiserThermostat<EOL>if thermostat.address in self.thermostats.keys():<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.thermostats[thermostat.address] = thermostat<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>except Exception as e:<EOL><INDENT>logging.info("<STR_LIT>")<EOL>logging.info(e.message)<EOL><DEDENT>return self._serport<EOL>
Registers a thermostat with the UH1