Skip to content

pb_client.service.Service.connect_hub async

connect_hub(*, hub_id=None, name=None, transport=None)

Connect to a hub and leave it connected.

The connection outlives this client: that is the point of the service.

Parameters:

Name Type Description Default
hub_id str | None

The hub's id, from scan.

None
name str | None

Connect to the first hub with this name instead.

None
transport str | None

Reach the hub this way, such as "usb" or "ble". Left out, the service uses whichever it can, preferring USB where a hub is reachable both ways.

None

Returns:

Type Description
HubInfo

The connected hub.