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.

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.1

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.1
File Size Uploaded Provenance Actions
aiotrimlight-0.2.1.tar.gz 79.8 kB With provenance Details for aiotrimlight-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 87.9 kB

Release files / aiotrimlight-0.2.1.tar.gz

Download URL aiotrimlight-0.2.1.tar.gz
Size 79.8 kB
Tags Source
SHA-256 checksum
How to use checksums
cb1240c4d42e9e51c125336b31f3405e2f6cefbca4cba7fdbeed82569238c1ec
BLAKE2b-256 checksum
How to use checksums
994ff0b700d1a53d540d4656cf1d524fb33020b4fd5f29a56d6dfb4bd8146bd5
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 27, 2026.

Transparency log

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

Download URL aiotrimlight-0.2.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3a5c30f5e4075c70457b52a6e76874ff817bb9a2744dc36ed7c9e2b2041f5e4
BLAKE2b-256 checksum
How to use checksums
7f686091209e9b5bfbbbb0e8738efd95703ba16297209ac6fdaa762e4b164e16
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 27, 2026.

Transparency log

Security for aiotrimlight 0.2.1

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.1.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 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