code: def _get_device_id(self, bus):
          
          _dbus = bus.get(SERVICE_BUS, PATH)
          devices = _dbus.devices()
  
          if self.device is None and self.device_id is None and len(devices) == 1:
              return devices[0]
  
          for id in devices:
              self._dev = bus.get(SERVICE_BUS, DEVICE_PATH + "/%s" % id)
              if self.device == self._dev.name:
                  return id
  
          return None
docs: Find the device id