Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioafero-9.0.1.tar.gz (379.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioafero-9.0.1-py3-none-any.whl (87.1 kB view details)

Uploaded Python 3

File details

Details for the file aioafero-9.0.1.tar.gz.

File metadata

  • Download URL: aioafero-9.0.1.tar.gz
  • Upload date:
  • Size: 379.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aioafero-9.0.1.tar.gz
Algorithm Hash digest
SHA256 5493d3a6709a47e0c499df999b430a207e0bd606533fe6bd9e0b59d8ba12106d
MD5 dc6af85eb2e8545e27877a4fdc5155a1
BLAKE2b-256 fcc8af654a1530b45f8e6c7d905835ef232b6a2f01f284c2e0d68a545ea50330

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioafero-9.0.1.tar.gz:

Publisher: release.yaml on Expl0dingBanana/aioafero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aioafero-9.0.1-py3-none-any.whl.

File metadata

  • Download URL: aioafero-9.0.1-py3-none-any.whl
  • Upload date:
  • Size: 87.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aioafero-9.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0a406d2d377dd9c2b6e90df5f98477896c5106a793e5ff184d47425211b0b7eb
MD5 6f8b36c3c65bd31617599dddc3e9fbb7
BLAKE2b-256 6107671623d6b39c751492d25d292b2f75ea5a2d457c14387fc2ac495d989b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioafero-9.0.1-py3-none-any.whl:

Publisher: release.yaml on Expl0dingBanana/aioafero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

9.3.0

2 files

9.2.1

2 files

9.2.0

2 files

9.1.0

2 files

This release

9.0.1 This release

2 files

9.0.0

2 files

8.0.0

2 files

7.0.10

2 files

7.0.9

2 files

7.0.8

2 files

7.0.6

2 files

7.0.5

2 files

7.0.4

2 files

7.0.3

2 files

7.0.2

2 files

7.0.1

2 files

7.0.0

2 files

6.2.0

2 files

6.1.2

2 files

6.1.1

2 files

6.1.0

2 files

6.0.1

2 files

6.0.0

2 files

5.7.0

2 files

5.6.1

2 files

5.6.0

2 files

5.5.0

2 files

5.4.1

2 files

5.4.0

2 files

5.3.0

2 files

5.2.3

2 files

5.2.2

2 files

5.2.1

2 files

5.2.0

2 files

5.1.1

2 files

5.1.0

2 files

5.0.0

2 files

4.2.0

2 files

4.1.1

2 files

4.1.0

2 files

4.0.1

2 files

4.0.0

2 files

3.3.5

2 files

3.3.4

2 files

3.3.3

2 files

3.3.2

2 files

3.3.1

2 files

3.3.0

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.1

2 files

3.1.0

2 files

3.0.2

2 files

3.0.1

2 files

3.0.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

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