pb_client.service.Service.use_hub
async
¶
use_hub(hub)
Choose the hub later commands act on when none is named.
The choice outlives the service, so it is a name: a hub has nothing durable to be remembered by, and an id built from a Bluetooth address would stop naming it. A hub that is not connected can be chosen by name; an id can only be given for a hub that is, since there is otherwise no name to store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hub
|
str | None
|
The hub to choose, by name or by id, or |
required |
Returns:
| Type | Description |
|---|---|
Choice
|
What was chosen, and whether it is connected. |