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.0.tar.gz (18.0 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.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for aioacaia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 729badfbc85408fef0a0d73b8995bf67d606057efea892c9b801ff6921c81512
MD5 2fe4f51ff36a0f88f76b2181fbb60240
BLAKE2b-256 49af88583ec2e8c74f3b0cca0272b842f86527fd1bb9ed00825cdc55afb0a300

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioacaia-0.2.0.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.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for aioacaia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a859c2a9eeb9f88ec138bfb0c1491873f154bcce2377c435c988e9bec9140c31
MD5 c864453c816454c39bdec7312df80282
BLAKE2b-256 21b20d4c2cf51cb73ac0f66a60456b84ad39e6d08cc7c9eb051a495d07e3fed9

See more details on using hashes here.

Provenance

The following attestation bundles were made for aioacaia-0.2.0-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

0.2.1

2 files

This release

0.2.0 This release

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