def newDevices(self, interface_id, dev_descriptions):
        """The CCU / Homegear informs us about newly added devices. We react on that and add those devices as well."""
        LOG.debug("RPCFunctions.newDevices: interface_id = %s, dev_descriptions = %s" % (
            interface_id, str(dev_descriptions)))
        remote = interface_id.split('-')[-1]
        if remote not in self._devices_raw:
            self._devices_raw[remote] = []
        if remote not in self._devices_raw_dict:
            self._devices_raw_dict[remote] = {}
        for d in dev_descriptions:
            self._devices_raw[remote].append(d)
            self._devices_raw_dict[remote][d['ADDRESS']] = d
        self.saveDevices(remote)
        self.createDeviceObjects(interface_id)
        if self.systemcallback:
            self.systemcallback('newDevices', interface_id, dev_descriptions)
        return True
def newDevices ( self , interface_id , dev_descriptions ) : LOG . debug ( "RPCFunctions.newDevices: interface_id = %s, dev_descriptions = %s" % ( interface_id , str ( dev_descriptions ) ) ) remote = interface_id . split ( '-' ) [ - 1 ] if remote not in self . _devices_raw : self . _devices_raw [ remote ] = [ ] if remote not in self . _devices_raw_dict : self . _devices_raw_dict [ remote ] = { } for d in dev_descriptions : self . _devices_raw [ remote ] . append ( d ) self . _devices_raw_dict [ remote ] [ d [ 'ADDRESS' ] ] = d self . saveDevices ( remote ) self . createDeviceObjects ( interface_id ) if self . systemcallback : self . systemcallback ( 'newDevices' , interface_id , dev_descriptions ) return True
The CCU / Homegear informs us about newly added devices. We react on that and add those devices as well.