py-netatmo-truetemp
Netatmo's missing true temperature API - set real room temps programmatically via the undocumented truetemperature endpoint.
⚠️ Disclaimer
Unofficial Project: This is an independent, community-developed library and is not affiliated with, endorsed by, or supported by Netatmo or Legrand.
Why This Exists: The official Netatmo OAuth API does not currently support programmatic temperature adjustments via the truetemperature endpoint. This library fills that gap using reverse-engineered API endpoints.
Archival Policy: This repository will be archived or removed if:
- Netatmo officially adds temperature control support to their OAuth API
- Netatmo requests takedown of this project
Use at Your Own Risk: This library relies on undocumented endpoints that may change without notice. Functionality could break if Netatmo modifies their internal API.
Features
- TrueTemperature API: Set room temperatures via Netatmo's undocumented endpoint
- Room Management: List and lookup rooms by name (case-insensitive) or ID
- Smart Updates: Skips API call if temperature already at target (0.1°C tolerance)
- Automatic Authentication: Cookie-based session management with secure storage (0o600)
- Auto-Retry: Automatically recovers from authentication failures and API errors
- Type-Safe: Full type hints with TypedDict definitions for API responses (Python 3.13+)
- Thread-Safe: Safe to use in multi-threaded applications
- Simple API: Easy-to-use facade with sensible defaults
- Extensible: Modular components for advanced customization
- Production-Ready: Comprehensive error handling and logging
Installation
From PyPI
pip install py-netatmo-truetemp
Or with uv:
uv add py-netatmo-truetemp
From Source
# Clone the repository
git clone https://github.com/py-netatmo-unofficial/py-netatmo-truetemp.git
cd py-netatmo-truetemp
# Create virtual environment and install
uv venv
uv sync
As a Dependency
From PyPI (recommended):
uv add py-netatmo-truetemp
From GitHub (development version):
uv add "py-netatmo-truetemp @ git+https://github.com/py-netatmo-unofficial/py-netatmo-truetemp.git"
Environment Variables
Set these required environment variables:
export NETATMO_USERNAME="your_username"
export NETATMO_PASSWORD="your_password"
Optional:
export NETATMO_HOME_ID="your_home_id" # Auto-detected if not set
Quick Start
import os
from py_netatmo_truetemp import NetatmoAPI
# Initialize the API (uses cookie-based authentication)
api = NetatmoAPI(
username=os.environ['NETATMO_USERNAME'],
password=os.environ['NETATMO_PASSWORD']
)
# Get homes data
homes = api.homesdata()
# Get home status
status = api.homestatus(home_id="your-home-id")
# List rooms with thermostats
rooms = api.list_thermostat_rooms()
# Returns: [{'id': '1234567890', 'name': 'Living Room'}, ...]
# Set room temperature (smart update with 0.1°C tolerance)
api.set_truetemperature(
room_id="1234567890",
corrected_temperature=20.5
)
Usage Examples
Command-Line Interface
For a complete CLI application built with this library, see:
- py-netatmo-truetemp-cli - Full-featured CLI with Typer and Rich formatting
The CLI demonstrates:
- Environment-based configuration
- Error handling patterns
- Room lookup by name
- Formatted terminal output
More Examples
Want to add your project here? Submit a PR or open an issue!
Common Use Cases
Set Temperature by Room Name
from py_netatmo_truetemp import NetatmoAPI
import os
api = NetatmoAPI(
username=os.environ['NETATMO_USERNAME'],
password=os.environ['NETATMO_PASSWORD']
)
# Get all rooms
rooms = api.list_thermostat_rooms()
living_room = next(r for r in rooms if r['name'].lower() == 'living room')
# Set temperature
api.set_truetemperature(
room_id=living_room['id'],
corrected_temperature=20.5
)
Monitor All Room Temperatures
status = api.homestatus()
for room in status['body']['home']['rooms']:
temp = room.get('therm_measured_temperature')
if temp:
print(f"Room {room['id']}: {temp}°C")
Custom Cookie Location
api = NetatmoAPI(
username=os.environ['NETATMO_USERNAME'],
password=os.environ['NETATMO_PASSWORD'],
cookies_file="/secure/path/cookies.json"
)
How It Works
The library provides a simple NetatmoAPI facade that handles all the complexity:
- Automatic Authentication: Cookie-based session management with secure storage (0o600 permissions)
- Smart API Calls: Auto-retry on authentication failures, skips redundant temperature updates
- Type-Safe Responses: Fully typed API responses for better IDE support and error prevention
- Thread-Safe Operations: Safe to use in multi-threaded applications with session locking
For advanced usage, you can access individual components directly (see Advanced Usage below).
For complete architectural details and SOLID design principles, see CLAUDE.md.
Advanced Usage
For advanced use cases, you can use individual components:
from py_netatmo_truetemp import (
CookieStore,
AuthenticationManager,
NetatmoApiClient,
HomeService,
ThermostatService
)
# Create custom cookie store
cookie_store = CookieStore("/custom/path/cookies.json")
# Inject custom session
import requests
session = requests.Session()
# Configure session as needed...
# Use components directly
auth_manager = AuthenticationManager(
username="...",
password="...",
cookie_store=cookie_store,
session=session
)
Security
- Credentials should be provided via environment variables
- Session cookies are cached with secure permissions (0o600)
- All API communications use HTTPS
- No unsafe pickle serialization
Development
Library Development
# Syntax check library modules
python -m py_compile src/py_netatmo_truetemp/*.py
Release Automation
This project uses semantic-release for fully automated releases. All versioning, changelog generation, and publishing happens automatically in CI when you push to the main branch.
Quick workflow:
# 1. Make changes with conventional commits
git commit -m "feat: add new feature"
git commit -m "fix: resolve bug"
# 2. Push to main - automatic release happens
git push origin main
# GitHub Actions automatically:
# - Analyzes conventional commits
# - Determines version bump (major/minor/patch)
# - Updates version in pyproject.toml and __init__.py
# - Generates and updates CHANGELOG.md
# - Creates git tag with verified signature
# - Creates GitHub Release
# - Publishes to PyPI
All commits must follow Conventional Commits format:
feat:- New features (minor version bump: 0.1.0 → 0.2.0)fix:- Bug fixes (patch version bump: 0.1.0 → 0.1.1)feat!:orBREAKING CHANGE:- Breaking changes (major version bump: 0.1.0 → 1.0.0)
Pre-commit hooks enforce commit message validation. For complete release workflow documentation, see RELEASE_WORKFLOW_GUIDE.md.
Documentation
- CLAUDE.md - Core library architecture and development guide
- RELEASE_WORKFLOW_GUIDE.md - Release automation and workflow guide
Contributing
Contributions are welcome! Please read our Contributing Guide for details on:
- Code of conduct
- Development setup
- Running tests
- Code style guidelines
- Conventional commit message format (required)
- Submitting pull requests
All commits must follow the Conventional Commits format. Pre-commit hooks will validate your commit messages automatically.
See also:
Support
- Bug Reports: Open an issue
- Feature Requests: Request a feature
- Security Issues: See SECURITY.md
- Questions: GitHub Discussions
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Uses modern Python 3.13+ features and comprehensive type hints
- Built with clean architecture patterns for maintainability (see CLAUDE.md)
- Inspired by the need for programmatic Netatmo thermostat control
Metadata
Release files for py-netatmo-truetemp 0.3.1
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 |
|---|---|---|---|---|
| py_netatmo_truetemp-0.3.1.tar.gz | 82.3 kB | With provenance | Details for py_netatmo_truetemp-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_netatmo_truetemp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for py_netatmo_truetemp-0.3.1-py3-none-any.whl |
Total release size: 102.7 kB
Release files / py_netatmo_truetemp-0.3.1.tar.gz
| Download URL | py_netatmo_truetemp-0.3.1.tar.gz |
|---|---|
| Size | 82.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e1fda8f5cce6f8b77246f953170317911bdfc3c7802ca0856326b179edb3ccd
|
|
BLAKE2b-256 checksum How to use checksums |
17d66edf558ff5389b30157cfaa0b53299057c500c68c46719cd9c58b11077be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 15, 2026.
Transparency logRelease files / py_netatmo_truetemp-0.3.1-py3-none-any.whl
| Download URL | py_netatmo_truetemp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 20.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7debbb741269eebabff92af789ea799f9ed417cf449b7689c3492477988c1cb6
|
|
BLAKE2b-256 checksum How to use checksums |
8a37803b6f965152730ff0d9636763ada058f2036d3ce61250536c04d979408d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Jan 15, 2026.
Transparency logSecurity for py-netatmo-truetemp 0.3.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.
Attestation for py_netatmo_truetemp-0.3.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 Jan 15, 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.