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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
729badfbc85408fef0a0d73b8995bf67d606057efea892c9b801ff6921c81512
|
|
| MD5 |
2fe4f51ff36a0f88f76b2181fbb60240
|
|
| BLAKE2b-256 |
49af88583ec2e8c74f3b0cca0272b842f86527fd1bb9ed00825cdc55afb0a300
|
Provenance
The following attestation bundles were made for aioacaia-0.2.0.tar.gz:
Publisher:
pypi.yaml on zweckj/aioacaia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioacaia-0.2.0.tar.gz -
Subject digest:
729badfbc85408fef0a0d73b8995bf67d606057efea892c9b801ff6921c81512 - Sigstore transparency entry: 2154852377
- Sigstore integration time:
-
Permalink:
zweckj/aioacaia@579669c685b5d9c79c15d57900f5a496cf5a00d0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zweckj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@579669c685b5d9c79c15d57900f5a496cf5a00d0 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a859c2a9eeb9f88ec138bfb0c1491873f154bcce2377c435c988e9bec9140c31
|
|
| MD5 |
c864453c816454c39bdec7312df80282
|
|
| BLAKE2b-256 |
21b20d4c2cf51cb73ac0f66a60456b84ad39e6d08cc7c9eb051a495d07e3fed9
|
Provenance
The following attestation bundles were made for aioacaia-0.2.0-py3-none-any.whl:
Publisher:
pypi.yaml on zweckj/aioacaia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aioacaia-0.2.0-py3-none-any.whl -
Subject digest:
a859c2a9eeb9f88ec138bfb0c1491873f154bcce2377c435c988e9bec9140c31 - Sigstore transparency entry: 2154852734
- Sigstore integration time:
-
Permalink:
zweckj/aioacaia@579669c685b5d9c79c15d57900f5a496cf5a00d0 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/zweckj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yaml@579669c685b5d9c79c15d57900f5a496cf5a00d0 -
Trigger Event:
release
-
Statement type: