Registers a thermostat with the UH1
329428
def registerThermostat(self, thermostat):
        """"""
        try:
            type(thermostat) == heatmiser.HeatmiserThermostat
            if thermostat.address in self.thermostats.keys():
                raise ValueError("Key already present")
            else:
                self.thermostats[thermostat.address] = thermostat
        except ValueError:
            pass
        except Exception as e:
            logging.info("You're not adding a HeatmiiserThermostat Object")
            logging.info(e.message)
        return self._serport
1355145
async def set_heater_temp(self, device_id, set_temp):
        """"""
        payload = {"homeType": 0,
                   "timeZoneNum": "+02:00",
                   "deviceId": device_id,
                   "value": int(set_temp),
                   "key": "holidayTemp"}
        await self.request("changeDeviceInfo", payload)
668278
protected void registerSharedStateComponent() {
        String componentPropName = GatewayConfigProperties.COMPONENT_PREFIX + ISharedStateComponent.class.getSimpleName();
        setConfigProperty(componentPropName,
                ESSharedStateComponent.class.getName());
        setConfigProperty(componentPropName + ".client.type", "jest");
        setConfigProperty(componentPropName + ".client.protocol", "${apiman.es.protocol}");
        setConfigProperty(componentPropName + ".client.host", "${apiman.es.host}");
        setConfigProperty(componentPropName + ".client.port", "${apiman.es.port}");
        setConfigProperty(componentPropName + ".client.username", "${apiman.es.username}");
        setConfigProperty(componentPropName + ".client.password", "${apiman.es.password}");
    }
807879
def register(self, name):
        
        signal = Signal(providing_args=['args', 'kwargs'])
        self._registry[name] = signal
        return signal
536744
def set_fan_mode(self, mode):
        """"""
        self.set_service_value(
            self.thermostat_fan_service,
            'Mode',
            'NewMode',
            mode)
        self.set_cache_value('fanmode', mode)
881585
def set_heater(self, heater):
        
        if type(heater) != int and heater not in range(0, 101):
            raise InvalidInput("Heater value must be int between 0-100")
        self._config['heater'] = heater
        self._q.put(self._config)
5337
def register_view(self, view):
        
        super(StateOutcomesEditorController, self).register_view(view)
        if isinstance(view, StateOutcomesEditorView):
            self.connect_signal(view['add_button'], "clicked", self.oc_list_ctrl.on_add)
            self.connect_signal(view['remove_button'], "clicked", self.oc_list_ctrl.on_remove)

            if isinstance(self.model.state, LibraryState) or self.model.state.get_next_upper_library_root_state():
                view['add_button'].set_sensitive(False)
                view['remove_button'].set_sensitive(False)
833644
def register(self, es, append=None, modulo=None):
        
        if not isinstance(es, CMAEvolutionStrategy):
            raise TypeError("only class CMAEvolutionStrategy can be " +
                            "registered for logging")
        self.es = es
        if append is not None:
            self.append = append
        if modulo is not None:
            self.modulo = modulo
        self.registered = True
        return self
406318
def activate_boost_by_name(self,
                               zone_name,
                               target_temperature,
                               num_hours=1):
        

        zone = self.get_zone(zone_name)
        if zone is None:
            raise RuntimeError("Unknown zone")

        return self.activate_boost_by_id(zone["zoneId"],
                                         target_temperature, num_hours)
1361201
def setup_statemachine(self):
        """"""

        machine = QtCore.QStateMachine()

        #  _______________
        # |               |
        # |               |
        # |               |
        # |_______________|
        #
        group = util.QState("group", QtCore.QState.ParallelStates, machine)

        #  _______________
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________| - Parallell State
        #
        visibility = util.QState("visibility", group)

        hidden = util.QState("hidden", visibility)
        visible = util.QState("visible", visibility)

        #  _______________
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________| - Parallell State
        #
        operation = util.QState("operation", group)

        ready = util.QState("ready", operation)

        collecting = util.QState("collecting", operation)
        validating = util.QState("validating", operation)
        extracting = util.QState("extracting", operation)
        integrating = util.QState("integrating", operation)

        finished = util.QState("finished", operation)
        repairing = util.QState("repairing", operation)
        initialising = util.QState("initialising", operation)
        stopping = util.QState("stopping", operation)
        stopped = util.QState("stopped", operation)
        saving = util.QState("saving", operation)

        #  _______________
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________| - Parallell State
        #
        errored = util.QState("errored", group)

        clean = util.QState("clean", errored)
        dirty = util.QState("dirty", errored)

        #  _______________
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________| - Parallell State

        # States that block the underlying GUI
        suspended = util.QState("suspended", group)

        alive = util.QState("alive", suspended)
        acting = util.QState("acting", suspended)
        acted = QtCore.QHistoryState(operation)
        acted.setDefaultState(ready)

        #  _______________
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________|
        # | ____     ____ |
        # ||    |---|    ||
        # ||____|---|____||
        # |_______________|
        #

        hidden.addTransition(self.show, visible)
        visible.addTransition(self.hide, hidden)

        ready.addTransition(self.acting, acting)
        ready.addTransition(self.validating, validating)
        ready.addTransition(self.initialising, initialising)
        ready.addTransition(self.repairing, repairing)
        ready.addTransition(self.saving, saving)
        saving.addTransition(self.saved, ready)

        collecting.addTransition(self.initialised, ready)
        collecting.addTransition(self.stopping, stopping)

        validating.addTransition(self.stopping, stopping)
        validating.addTransition(self.finished, finished)
        validating.addTransition(self.extracting, extracting)

        extracting.addTransition(self.stopping, stopping)
        extracting.addTransition(self.finished, finished)
        extracting.addTransition(self.integrating, integrating)

        integrating.addTransition(self.stopping, stopping)
        integrating.addTransition(self.finished, finished)

        finished.addTransition(self.initialising, initialising)
        finished.addTransition(self.acting, acting)
        initialising.addTransition(self.collecting, collecting)
        stopping.addTransition(self.acted, acted)
        stopping.addTransition(self.finished, finished)

        dirty.addTransition(self.initialising, clean)
        clean.addTransition(self.changed, dirty)

        alive.addTransition(self.acting, acting)
        acting.addTransition(self.acted, acted)

        # Set initial states
        for compound, state in {machine: group,
                                visibility: hidden,
                                operation: ready,
                                errored: clean,
                                suspended: alive}.items():
            compound.setInitialState(state)

        # Make connections
        for state in (hidden,
                      visible,
                      ready,
                      collecting,
                      validating,
                      extracting,
                      integrating,
                      finished,
                      repairing,
                      initialising,
                      stopping,
                      saving,
                      stopped,
                      dirty,
                      clean,
                      acting,
                      alive,
                      acted):
            state.entered.connect(
                lambda state=state: self.state_changed.emit(state.name))

        machine.start()
        return machine
291845
private void registerThis()
    {
        DefaultComponentDescriptor<ComponentManager> cd = new DefaultComponentDescriptor<>();
        cd.setRoleType(ComponentManager.class);

        registerComponent(cd, this);
    }
612691
def get_thermostat_state_by_name(self, name):
        
        self._validate_thermostat_state_name(name)
        return next((state for state in self.thermostat_states
                     if state.name.lower() == name.lower()), None)
1148588
def set_temperature(self, temp):
        """"""

        self.set_service_value(
            self.thermostat_setpoint,
            'CurrentSetpoint',
            'NewCurrentSetpoint',
            temp)

        self.set_cache_value('setpoint', temp)
1203119
def _setup(self):
        

        # Create a root system ticks and user configurable ticks
        systick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        fasttick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        user1tick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)
        user2tick = self.allocator.allocate_stream(DataStream.CounterType, attach=True)

        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(system_tick, systick))
        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(fast_tick, fasttick))
        self.sensor_graph.add_config(SlotIdentifier.FromString('controller'), config_fast_tick_secs, 'uint32_t', 1)

        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(tick_1, user1tick))
        self.sensor_graph.add_node("({} always) => {} using copy_all_a".format(tick_2, user2tick))
        self.system_tick = systick
        self.fast_tick = fasttick
        self.user1_tick = user1tick
        self.user2_tick = user2tick
846440
def set_target_temperture_by_name(self, zone_name, target_temperature):
        
        zone = self.get_zone(zone_name)

        if zone is None:
            raise RuntimeError("Unknown zone")

        return self.set_target_temperature_by_id(zone["zoneId"],
                                                 target_temperature)
1167720
def change_t(self, t):
        '''
        
        '''
        t = super().change_t(t)
        self.__now_cycles += 1
        if self.__now_cycles % self.__reannealing_per == 0:
            t = t * self.__thermostat
            
            if t < self.__t_min:
                t = self.__t_default
        return t
1355893
def activate(self):
        

        raise NotImplementedError("{0} | '{1}' must be implemented by '{2}' subclasses!".format(
            self.__class__.__name__, self.activate.__name__, self.__class__.__name__))