Skip to main content

laifen-ble

Async Bluetooth LE library for the Laifen Wave electric toothbrush (LFTB01-P).

It reads the toothbrush state (active mode, per-mode settings, battery level, brushing time, running state and feature flags) and, when its format is known, the firmware version. It is built on bleak and bleak-retry-connector and is intended to be used by the Home Assistant laifen integration.

Supported devices

Model Advertised name Status
Laifen Wave (plastic, stainless steel and aluminium shells) LFTB01-P-xxxx Supported
Laifen Wave SE, Wave Pro and other models LFTB01-SE-…, LFTB02-… Not supported (different protocol)

Usage

import asyncio

from bleak import BleakScanner

from laifen_ble import LaifenToothbrush, is_supported


async def main() -> None:
    device = await BleakScanner.find_device_by_filter(
        lambda device, advertisement: is_supported(advertisement.local_name)
    )
    toothbrush = LaifenToothbrush(device)
    toothbrush.register_callback(lambda: print(toothbrush.state))
    await toothbrush.connect()
    print(toothbrush.firmware_version, toothbrush.state)
    await asyncio.sleep(30)
    await toothbrush.disconnect()


asyncio.run(main())

The toothbrush only advertises while it is awake (after a button press) and disconnects on its own about a minute after the last activity. While connected it pushes its state on every change, so registered callbacks are called whenever the state, the firmware version or the connection changes.

Protocol

The protocol was documented by marc-alexis-com/laifen-toolbox and earlier explored by UrbanTechIO/Laifen. This library only sends the documented read requests.

Development

python -m venv .venv
. .venv/bin/activate
pip install -e '.[test,lint]'
pytest
ruff check . && ruff format --check . && mypy src

License

MIT

Metadata

Release files for laifen-ble 0.1.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 laifen-ble 0.1.0
File Size Uploaded Provenance Actions
laifen_ble-0.1.0.tar.gz 8.4 kB With provenance Details for laifen_ble-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for laifen-ble 0.1.0
File Interpreter ABI Platform Actions
laifen_ble-0.1.0-py3-none-any.whl Python 3 none any Details for laifen_ble-0.1.0-py3-none-any.whl

Total release size: 16.0 kB

Release files / laifen_ble-0.1.0.tar.gz

Download URL laifen_ble-0.1.0.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5aa12ebdbe9ec64bd6f64277389b550c8d94ff689cfb9a6e2d3e338452275f92
BLAKE2b-256 checksum
How to use checksums
832a519f42b3f39974655169ed45fb68b0cdc3c25ccda673c4cb06430875a73e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Release files / laifen_ble-0.1.0-py3-none-any.whl

Download URL laifen_ble-0.1.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7abd5e23c9d6959c0dde73a96acf56548a6bfb2881535afd1cd05e02394adb29
BLAKE2b-256 checksum
How to use checksums
5e82a51e9cd8e054cb65755312de20b893eee6e39e91059b77820823ca25df44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for laifen-ble 0.1.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 laifen_ble-0.1.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 Nov 26, 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.

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