Skip to main content

aiotrimlight

CI

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

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 trimlight-ha-api
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,
        )
        state = await client.get_light_state()
        print(state)


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.4.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 aiotrimlight 0.4.0
File Size Uploaded Provenance Actions
aiotrimlight-0.4.0.tar.gz 87.6 kB With provenance Details for aiotrimlight-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 97.1 kB

Release files / aiotrimlight-0.4.0.tar.gz

Download URL aiotrimlight-0.4.0.tar.gz
Size 87.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a50790f3319641d1f544712809cfaa7ae11a0d7a7b339e6acb98055216b84494
BLAKE2b-256 checksum
How to use checksums
c03af404845bf1e0aa7c5b6ad251627c3b04b9e79c1e8b61bd5d14af816166ce
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 Oct 27, 2026.

Transparency log

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

Download URL aiotrimlight-0.4.0-py3-none-any.whl
Size 9.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3b0c49295342cca9998f0adb3f2c02113e6fecb4b866188955217d06127fc145
BLAKE2b-256 checksum
How to use checksums
28dfe59d6b854c74f5ce7ff90f6ca1db521bcc5feae220b752cdf166463424c6
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 Oct 27, 2026.

Transparency log

Security for aiotrimlight 0.4.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 aiotrimlight-0.4.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 Oct 27, 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