Skip to main content

aioafero

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/

https://github.com/Expl0dingBanana/aioafero/actions/workflows/cicd.yaml/badge.svg?branch=main https://codecov.io/github/Expl0dingBanana/aioafero/graph/badge.svg?token=NP2RE4I4XK

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.

Metadata

Release files for aioafero 9.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aioafero 9.3.0
File Size Uploaded Provenance Actions
aioafero-9.3.0.tar.gz 444.5 kB With provenance Details for aioafero-9.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aioafero 9.3.0
File Interpreter ABI Platform Actions
aioafero-9.3.0-py3-none-any.whl Python 3 none any Details for aioafero-9.3.0-py3-none-any.whl

Total release size: 561.6 kB

Release files / aioafero-9.3.0.tar.gz

Download URL aioafero-9.3.0.tar.gz
Size 444.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4e9999f74d00c534ba8542effbd1acdfaf4e97ed84b13705ab8a5b341d25c43f
BLAKE2b-256 checksum
How to use checksums
e38e8c212531d6bf3c8ab3eccd1f350e4307a53973724258005b1eb4a78ab75d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / aioafero-9.3.0-py3-none-any.whl

Download URL aioafero-9.3.0-py3-none-any.whl
Size 117.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e8b92b369a310915fa330df371f1ab27975cea569a122ca18df1d1a7f0be44
BLAKE2b-256 checksum
How to use checksums
95a320262a9b9dc36dd159e3a6ccf03e2bd79a92cd41210124e3fa01b5ee7699
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Security for aioafero 9.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aioafero-9.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

9.3.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page