Async Python library for the Afero IoT cloud API. Discover devices, poll state, and send commands through typed controllers on AferoBridgeV1.
Documentation: https://aioafero.readthedocs.io/
Installation
pip install aioafero
For Home Assistant, use the Hubspace integration, which installs this library from PyPI.
Quick start
Examples assume an asyncio REPL (python -m asyncio).
import aiohttp
from aioafero import v1
session = aiohttp.ClientSession()
auth = v1.AferoAuth.for_login(session, "user@example.com", "password")
try:
token_data = await auth.login()
except v1.OTPRequired:
token_data = await auth.submit_otp(
input("Enter the code from your email: ").strip()
)
bridge = v1.AferoBridgeV1(
"user@example.com",
token_data.refresh_token,
session=session,
)
await bridge.initialize()
await bridge.async_block_until_done()
await bridge.lights.turn_off("<device_id>")
await bridge.close()
await session.close()
See the user guide — especially authentication — for bridge configuration, controllers, subscribe callbacks, and troubleshooting.
Contributing
Bug reports and pull requests are welcome on GitHub. See CONTRIBUTING.md and the contributing docs.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioafero-9.2.1.tar.gz.
File metadata
- Download URL: aioafero-9.2.1.tar.gz
- Upload date:
- Size: 392.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
485421b181c52349e296d32f681c58aca42d21a78391873e0514ad152beb6023
|
|
| MD5 |
f3d6621406cdbd615bd1f8cc42c3458d
|
|
| BLAKE2b-256 |
29b093a50d7cedee3d11a0dab711f8df3fc5dc3561b24266480a9dac776a988b
|
Provenance
The following attestation bundles were made for aioafero-9.2.1.tar.gz:
Publisher:
release.yaml on Expl0dingBanana/aioafero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioafero-9.2.1.tar.gz -
Subject digest:
485421b181c52349e296d32f681c58aca42d21a78391873e0514ad152beb6023 - Sigstore transparency entry: 2821450614
- Sigstore integration time:
-
Permalink:
Expl0dingBanana/aioafero@5af5b2d927e7a96d9b4ecfa7fd60f05fa2029659 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Expl0dingBanana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5af5b2d927e7a96d9b4ecfa7fd60f05fa2029659 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file aioafero-9.2.1-py3-none-any.whl.
File metadata
- Download URL: aioafero-9.2.1-py3-none-any.whl
- Upload date:
- Size: 90.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc2960561a2922ccc98884a443a024caa3d0e98a54b7f18276a1feff1fe3e83
|
|
| MD5 |
a6966b8990c1280b59dfcb25fe8cd01e
|
|
| BLAKE2b-256 |
6c9322090d507e0dc0e3f138758c0f95cb203267ecfcd3046efe7031027c895c
|
Provenance
The following attestation bundles were made for aioafero-9.2.1-py3-none-any.whl:
Publisher:
release.yaml on Expl0dingBanana/aioafero
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioafero-9.2.1-py3-none-any.whl -
Subject digest:
6bc2960561a2922ccc98884a443a024caa3d0e98a54b7f18276a1feff1fe3e83 - Sigstore transparency entry: 2821450648
- Sigstore integration time:
-
Permalink:
Expl0dingBanana/aioafero@5af5b2d927e7a96d9b4ecfa7fd60f05fa2029659 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Expl0dingBanana
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@5af5b2d927e7a96d9b4ecfa7fd60f05fa2029659 -
Trigger Event:
workflow_dispatch
-
Statement type: