Skip to main content

aiotrimlight

CI

aiotrimlight is an asynchronous Python client for the Trimlight V3 local HTTP API. It provides device metadata, runtime light state, and high-level power, brightness, and static color control.

Requirements

  • Python 3.14 or newer.
  • A Trimlight controller with the V3 local HTTP API.
  • The client and controller must be reachable on the same local network.

Installation

python -m pip install aiotrimlight

For source development:

git clone https://github.com/spdevpro/trimlight-ha-api.git
cd aiotrimlight
uv sync --locked --group test --python 3.14

Usage

import asyncio

from aiohttp import ClientSession

from aiotrimlight import TrimlightClient


async def main() -> None:
    async with ClientSession(trust_env=False) as session:
        client = TrimlightClient("192.0.2.10", session)

        device = await client.get_device_info()
        state = await client.get_light_state()
        print(device, state)

        await client.set_light_state(
            on=True,
            brightness=64,
            red=255,
            green=255,
            blue=255,
            warm_white=0,
            cold_white=0,
        )


asyncio.run(main())

Replace the example address with the controller's LAN IP address.

trust_env=False prevents system proxy settings from routing local controller traffic through an HTTP proxy.

Discovery metadata exposes both the normalized DID and the full MAC address encoded by the firmware:

from aiotrimlight import parse_discovery_properties

discovery = parse_discovery_properties({"did": "544c0003020000000001"})
print(discovery.did)  # 544c0003020000000001
print(discovery.mac_address)  # 02:00:00:00:00:01

Development

uv sync --locked --group test --python 3.14
uv run --no-sync pytest --cov=aiotrimlight --cov-branch --cov-report=term-missing
uv run --no-sync ruff check .
uv run --no-sync ruff format --check .
uv run --no-sync mypy src tests
uv build --no-sources --clear
uv run --no-sync twine check dist/*

Releases

Stable releases are built and published through GitHub Actions using PyPI Trusted Publishing.

License

aiotrimlight is distributed under the MIT License. See LICENSE.

Metadata

Release files for aiotrimlight 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiotrimlight 0.2.2
File Size Uploaded Provenance Actions
aiotrimlight-0.2.2.tar.gz 80.1 kB With provenance Details for aiotrimlight-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiotrimlight 0.2.2
File Interpreter ABI Platform Actions
aiotrimlight-0.2.2-py3-none-any.whl Python 3 none any Details for aiotrimlight-0.2.2-py3-none-any.whl

Total release size: 88.5 kB

Release files / aiotrimlight-0.2.2.tar.gz

Download URL aiotrimlight-0.2.2.tar.gz
Size 80.1 kB
Tags Source
SHA-256 checksum
How to use checksums
958568b5c1cc458f6d65a4dd62fd10fb705d59610e3da94ef54daeaa24206fb2
BLAKE2b-256 checksum
How to use checksums
19488b510b8d54657bfee26f19b9a8ecc0316aebca480b74b58362a06d218662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

Release files / aiotrimlight-0.2.2-py3-none-any.whl

Download URL aiotrimlight-0.2.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e42cd417b47383395ad806c29c4a2f51a8a9683992fe62c275c391ca5841c2a
BLAKE2b-256 checksum
How to use checksums
f239be06d27100482e50c561e6d5a9fe04bc45b1e24a3f5b4f6e09525a39bf0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 31, 2026.

Transparency log

Security for aiotrimlight 0.2.2

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 aiotrimlight-0.2.2.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 Aug 31, 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