Skip to main content

aioacaia

Async Python library for interacting with Acaia Bluetooth scales.

Usage

import asyncio

from aioacaia import AcaiaScale
from aioacaia.discovery import find_acaia_devices, is_new_scale


async def main() -> None:
    addresses = await find_acaia_devices()
    if not addresses:
        raise RuntimeError("No Acaia scale found")

    address = addresses[0]
    scale = AcaiaScale(
        address,
        is_new_style_scale=await is_new_scale(address),
    )
    await scale.connect()

    try:
        await scale.tare()
        await scale.start_stop_timer()
        await scale.reset_timer()
    finally:
        await scale.disconnect()


asyncio.run(main())

State Updates

Pass a no-argument callback to receive notification when the scale state changes. The latest values are available through weight, timer, flow_rate, and device_state.

import asyncio

from aioacaia import AcaiaScale


async def monitor(address: str) -> None:
    scale: AcaiaScale

    def state_changed() -> None:
        print(f"Weight: {scale.weight}")
        print(f"Timer: {scale.timer}")
        if scale.device_state is not None:
            print(f"Battery: {scale.device_state.battery_level}%")

    scale = AcaiaScale(address, notify_callback=state_changed)
    await scale.connect()
    try:
        await asyncio.Event().wait()
    finally:
        await scale.disconnect()


asyncio.run(monitor("AA:BB:CC:DD:EE:FF"))

connect() also accepts a raw Bleak notification callback. Supplying one bypasses the built-in parsing and state updates.

Download files

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

Source Distribution

aioacaia-0.2.1.tar.gz (19.7 kB view details)

Uploaded Source

Built Distribution

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

aioacaia-0.2.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file aioacaia-0.2.1.tar.gz.

File metadata

  • Download URL: aioacaia-0.2.1.tar.gz
  • Upload date:
  • Size: 19.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aioacaia-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0d56df0f2e6e98ed8b44cc6f1e00f19320c8137dc3e0a2b24776a8fe45057901
MD5 4ef6a1a196118f54fe4052ca513d4fcb
BLAKE2b-256 78d4b28e2dd731ea6bb280ed5f611be2bf45a0cbb50d2031f812cd0567f51850

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioacaia-0.2.1.tar.gz:

Publisher: pypi.yaml on zweckj/aioacaia

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

File details

Details for the file aioacaia-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: aioacaia-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for aioacaia-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a17400f7550313354aebb816de65dbac5396489478e3577014b48559b0fc61f
MD5 a385887c60d223ba2fb5c65f3672f720
BLAKE2b-256 6b6ea3272fbe084c40066eff352357cafa44d35f1fcbc7e276f673efc2c73d73

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioacaia-0.2.1-py3-none-any.whl:

Publisher: pypi.yaml on zweckj/aioacaia

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

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 files

0.2.0

2 files

0.1.18

2 files

0.1.17

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page