Skip to main content

aioNanoleaf2 package

PyPI PyPI - Downloads PyPI - License

This async Python wrapper for the Nanoleaf API replaces the no longer maintained aioNanoleaf package.

The original aioNanoleaf has been modified to:

  • add support for Nanoleaf Essentials devices.
  • add support for Screen Mirroring emersion modes (1D, 2D, 3D, 4D).
  • add support for IPv6 hosts.

Installation

pip install aionanoleaf2

Example

from aiohttp import ClientSession
from asyncio import run

import aionanoleaf2

async def test():
    async with ClientSession() as session:
        nanoleaf = aionanoleaf2.Nanoleaf(session, "192.168.1.28")
        try:
            await nanoleaf.authorize()
        except aionanoleaf2.Unauthorized as ex:
            print("Not authorized:", ex)
            return
        await nanoleaf.turn_on()
        await nanoleaf.get_info()
        print("IT'S WORKING!");
        print("Host:", nanoleaf.host)
        print("Port:", nanoleaf.port)
        print("API URL:", nanoleaf._api_url)
        print("Name:", nanoleaf.name)
        print("Manufacturer:", nanoleaf.manufacturer)
        print("Model:", nanoleaf.model)
        print("Serial number:", nanoleaf.serial_no)
        print("Hardware version:", nanoleaf.hardware_version)
        print("Firmware version:", nanoleaf.firmware_version)
        print("On:", nanoleaf.is_on);
        print("Brightness:", f"{nanoleaf.brightness} [{nanoleaf.brightness_min} - {nanoleaf.brightness_max}]")
        print("Hue:", f"{nanoleaf.hue} [{nanoleaf.hue_min} - {nanoleaf.hue_max}]")
        print("Saturation:", f"{nanoleaf.saturation} [{nanoleaf.saturation_min} - {nanoleaf.saturation_max}]")
        print("Color temperature:", f"{nanoleaf.color_temperature} [{nanoleaf.color_temperature_min} - {nanoleaf.color_temperature_max}]")
        print("Color mode:", nanoleaf.color_mode)
        print("Effects:", nanoleaf.effects_list)
        print("Selected effect:", nanoleaf.selected_effect)
        print("Emersions:", nanoleaf.emersion_list)
        print("Selected emersion:", nanoleaf.selected_emersion)
        print("Panels:", len(nanoleaf.panels))
        await nanoleaf.identify()
        await nanoleaf.turn_off()
        await nanoleaf.deauthorize()

run(test())

Metadata

Release files for aionanoleaf2 1.0.5

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

Source distribution (sdist)

Source distribution for aionanoleaf2 1.0.5
File Size Uploaded Provenance
aionanoleaf2-1.0.5.tar.gz 25.5 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 54.4 kB

Release files / aionanoleaf2-1.0.5.tar.gz

Download URL aionanoleaf2-1.0.5.tar.gz
Size 25.5 kB
Tags Source
SHA-256 checksum
How to use checksums
912d211a8b5dbabc1a4bc35fa14044bbdf508eb37000724d3b7681c3f83371ea
BLAKE2b-256 checksum
How to use checksums
c952b1ff62d523b830dae42d9bf174b222c782adecd93114bbfdce7772add3f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Release files / aionanoleaf2-1.0.5-py3-none-any.whl

Download URL aionanoleaf2-1.0.5-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
04fe49068d09b2f5c34aa0a3b261cea0c141c38f7d5f2fc732065e6651cf803c
BLAKE2b-256 checksum
How to use checksums
d479513572cb83ca2ff5d6551fba83d0cf280f63605bf197c925931253619805
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.0

Security for aionanoleaf2 1.0.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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