aiohomeconnect.cli package

Provide a CLI for Home Connect API.

aiohomeconnect.cli.authorize(client_id: str, client_secret: str) None[source]

Authorize the client.

aiohomeconnect.cli.get_appliances(client_id: str, client_secret: str) None[source]

Get the appliances.

aiohomeconnect.cli.get_operation_state(client_id: str, client_secret: str, ha_id: str) None[source]

Get the operation state of the device.

aiohomeconnect.cli.set_selected_program_option(client_id: str, client_secret: str, ha_id: str, *, option_key: OptionKey, bool_value: bool | None = None, float_value: float | None = None, string_value: str | None = None) None[source]

Set an option of a program on an appliance.

aiohomeconnect.cli.subscribe_all_appliances_events(client_id: str, client_secret: str) None[source]

Subscribe and print events from all the appliances.

aiohomeconnect.cli.subscribe_appliance_events(client_id: str, client_secret: str, ha_id: str) None[source]

Subscribe and print events from one appliance.

Submodules

aiohomeconnect.cli.client module

Provide a CLI client for Home Connect API.

class aiohomeconnect.cli.client.Auth(httpx_client: AsyncClient, host: str, token_manager: TokenManager)[source]

Bases: AbstractAuth

Implement the authentication.

async async_get_access_token() str[source]

Return a valid access token.

class aiohomeconnect.cli.client.CLIClient(client_id: str, client_secret: str, redirect_uri: str | None = None, scope: str | None = None)[source]

Bases: Client

Represent a CLI client for Home Connect API.

class aiohomeconnect.cli.client.TokenManager(client_id: str, client_secret: str, redirect_uri: str | None = None, scope: str | None = None)[source]

Bases: object

Manage the tokens for authentication.

async create_authorization_url() str[source]

Create the authorization URL.

async fetch_access_token(code: str) dict[str, Any][source]

Fetch the access token.

is_token_valid() bool[source]

Check if the token is valid.

async load_access_token() None[source]

Load the access token.

async refresh_access_token() None[source]

Refresh the access token.

async save_access_token() None[source]

Save the access token.