platypush/plugins/bluetooth/__init__.py
def lookup_name(self, addr: str, timeout: int = 10) -> BluetoothLookupNameResponse:
        """
        Look up the name of a nearby bluetooth device given the address

        :param addr: Device address
        :param timeout: Lookup timeout (default: 10 seconds)
        """
        from bluetooth import lookup_name

        self.logger.debug('Looking up name for device {}'.format(addr))
        name = lookup_name(addr, timeout=timeout)

        dev = {
            'addr': addr,
            'name': name,
            'class': self._devices_by_addr.get(addr, {}).get('class'),
        }

        self._devices_by_addr[addr] = dev
        if name:
            self._devices_by_name[name] = dev

        return BluetoothLookupNameResponse(addr=addr, name=name)

        Look up the name of a nearby bluetooth device given the address

        :param addr: Device address
        :param timeout: Lookup timeout (default: 10 seconds)
        
Look up the name of a nearby bluetooth device given the address
Look up the name of a nearby bluetooth device given the address
def lookup_name(self, addr: str, timeout: int = 10) -> BluetoothLookupNameResponse:
        from bluetooth import lookup_name
        self.logger.debug('Looking up name for device {}'.format(addr))
        name = lookup_name(addr, timeout=timeout)
        dev = {
            'addr': addr,
            'name': name,
            'class': self._devices_by_addr.get(addr, {}).get('class'),
        }
        self._devices_by_addr[addr] = dev
        if name:
            self._devices_by_name[name] = dev
        return BluetoothLookupNameResponse(addr=addr, name=name)
def lookup_name ( self , addr : str , timeout : int = 10 ) -> BluetoothLookupNameResponse : from bluetooth import lookup_name self . logger . debug ( 'Looking up name for device {}' . format ( addr ) ) name = lookup_name ( addr , timeout = timeout ) dev = { 'addr' : addr , 'name' : name , 'class' : self . _devices_by_addr . get ( addr , { } ) . get ( 'class' ) , } self . _devices_by_addr [ addr ] = dev if name : self . _devices_by_name [ name ] = dev return BluetoothLookupNameResponse ( addr = addr , name = name )
Look up the name of a nearby bluetooth device given the address
Look up the name of a nearby bluetooth device given the address
"""
        Look up the name of a nearby bluetooth device given the address

        :param addr: Device address
        :param timeout: Lookup timeout (default: 10 seconds)
        """
self
addr
str
None
timeout
int
Lookup timeout (default: 10 seconds)
Lookup timeout ( default : 10 seconds )