pysomneo
An async Python library to communicate with the API of Philips Somneo wake-up lights.
Features
- Async-first design using
aiohttpfor optimal Home Assistant integration - Automatic session management with connection pooling
- Exponential backoff with jitter for transient errors
- Automatic session recovery on connection errors
- Full support for all Somneo API endpoints:
- Light control (main light, night light)
- Alarm management (create, modify, delete, enable/disable)
- Sunset simulation (dusk mode)
- Audio player control (FM radio, AUX, nature sounds)
- Sensor data (temperature, humidity, luminance, noise level)
- Display settings
- Snooze configuration
Installation
pip install pysomneo
Usage
import asyncio
from pysomneo import Somneo
async def main():
somneo = Somneo("192.168.1.100")
# Fetch all data
data = await somneo.fetch_data()
print(data)
# Get device info
dev_info = await somneo.get_device_info()
print(dev_info)
# Control the light
await somneo.toggle_light(True, brightness=128)
# Get current data
data = await somneo.fetch_data()
print(f"Temperature: {data['temperature']}")
print(f"Light is on: {data['light_is_on']}")
asyncio.run(main())
Development
pip install -e .
Metadata
Release files for pysomneo 6.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysomneo-6.0.0.tar.gz | 50.2 kB | With provenance | Details for pysomneo-6.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysomneo-6.0.0-py3-none-any.whl | Python 3 | none | any | Details for pysomneo-6.0.0-py3-none-any.whl |
Total release size: 89.3 kB
Release files / pysomneo-6.0.0.tar.gz
| Download URL | pysomneo-6.0.0.tar.gz |
|---|---|
| Size | 50.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0723b2afbe6a15b70fe54f4e396da02c67d9e3d5f5ba2e476ae57c343e98418e
|
|
BLAKE2b-256 checksum How to use checksums |
a9e24fc15b42cca68eaee7fb24c166ebb1f609d194dc0bc0b35fe3046fab0290
|
| 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 16, 2026.
Transparency logRelease files / pysomneo-6.0.0-py3-none-any.whl
| Download URL | pysomneo-6.0.0-py3-none-any.whl |
|---|---|
| Size | 39.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af2c8416214404c327e7a449527a1da6d73fcf52b3ca1441f081e746669e0846
|
|
BLAKE2b-256 checksum How to use checksums |
2c5eca74b99f2809e9db2f3e1d41b340edaca025c57cac8212adaadda6d98639
|
| 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 16, 2026.
Transparency logSecurity for pysomneo 6.0.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.
Attestation for pysomneo-6.0.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 16, 2026.
Transparency logA 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.