This is a Python client for the Electrolux Group API. It is a simple wrapper around the API.
Project description
Work in progress
Electrolux Group API Client
This is a Python client for the Electrolux Group API. It is a simple wrapper around the API, which allows you to interact with the API in a more Pythonic way.
Installation
Use poetry install --extras cli
to install dependencies for CLI and the library itself.
Usage
usage: cli.py [-h] -k API_KEY -t ACCESS_TOKEN -r REFRESH_TOKEN {list,command} ...
positional arguments:
{login,list,command}
options:
-h, --help show this help message and exit
Authentication
Before being able to use the CLI, you'll need to provide access token, refresh token and API key. All of these can be obtained using the developer dashboard.
To store credentials locally, use the login
command:
poetry run python3 src/cli.py login -k $API_KEY -t $ACCESS_TOKEN -r $REFRESH_TOKEN
Listing devices
To list all devices, use the list
command:
poetry run python3 src/cli.py list
Sending commands
Commands to be sent must be proper JSON.
You can use the list
command described above to find appliance IDs and commands that will be accepted by the appliance.
For example, to change the fan speed for an air purifier you can use the following commands:
poetry run python3 src/cli.py command -d $APPLIANCE_ID -c '{"Workmode": "Manual"}'
poetry run python3 src/cli.py command -d $APPLIANCE_ID -c '{"Fanspeed": 3}'
and to switch it to automatic mode you can use
poetry run python3 src/cli.py command -d $APPLIANCE_ID -c '{"Workmode": "Auto"}'
Disclaimer
This client is not officially supported by Electrolux Group. It is a community project, and it is not guaranteed to be up-to-date with the latest changes in the API.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyelectroluxgroup-0.2.1.tar.gz
.
File metadata
- Download URL: pyelectroluxgroup-0.2.1.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96d2d340aefc2df2e1e7809b1cf91c56a14d003fcec444578e5d930b8300554d |
|
MD5 | b65eb9a78c58b0418a70e01c3c681b32 |
|
BLAKE2b-256 | 44daa5f1e421f7b96a7a7bb7a44e417551d388065aadadc9f2bcf2f8eaefebee |
File details
Details for the file pyelectroluxgroup-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pyelectroluxgroup-0.2.1-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28cf8c8dd98230eecc83a5619e5812ca6f4349f34f268e250c6a29b8010c7a4b |
|
MD5 | 4e5c09937d9541a978cef784e014b935 |
|
BLAKE2b-256 | 636fe6b0ee571b4263fd4f3c7ada851cad4cd814510c531fc517947fc4f06bd0 |