Skip to main content

Tado python library

Libtado Logo

License: GPL-3.0 GitHub Repo stars

build Docs

A library to control your Tado Smart Thermostat. This repository contains an actual library in libtado/api.py and a proof of concept command line client in libtado/__main__.py.

The tested version of APIs is Tado v2.

⚠️ Breaking change in v4 ⚠️

Starting the 21st of March 2025, the Tado authentication workflow will definitely change to OAuth2 device code grant flow.

Here is the link to the official announcement: Tado Support Article - How do I authenticate to access the REST API?

Now, you have to use the TADO_CREDENTIALS_FILE or TADO_REFRESH variables to authenticate. You can find more documentation on how to authenticate in the Libtado - CLI Configuration documentation.

Installation

You can download official library with pip install libtado.

But because I do not own a Tado anymore you may want to use a fork of libtado instead. For example you can install the fork that is currently (February 2019) maintained and improved by @germainlefebvre4. Please note that I do not monitor or verify changes of this repository. Please check the source yourself.

git clone https://github.com/germainlefebvre4/libtado.git

Please check out https://libtado.readthedocs.io for more documentation.

Usage

Download the repository. You can work inside it. Beware that the examples assume that they can access the file ./libtado/api.py.

Define a location and filename that will hold the credentials (refresh token) of your Tado login.

It is recommended to use a directory that only your application has access to, as the credentials file holds sensitive information!

Now you can call it in your Python script!

from libtado.api import Tado
import webbrowser   # only needed for direct web browser access

t = Tado(token_file_path='/tmp/.libtado-refresh-token')
# OR: t = Tado(saved_refresh_token='my-refresh-token')

status = t.get_device_activation_status()

if status == "PENDING":
    url = t.get_device_verification_url()

    # to auto-open the browser (on a desktop device), un-comment the following line:
    webbrowser.open_new_tab(url)

    t.device_activation()

    status = t.get_device_activation_status()

if status == "COMPLETED":
    print("Login successful")
else:
    print(f"Login status is {status}")

print(t.get_me())
print(t.get_home())
print(t.get_zones())
print(t.get_state(1))

The first time, the script will tell you to login to your Tado account.

It will show an output like:

Please visit the following URL in your Web browser to log in to your Tado account: https://login.tado.com/oauth2/device?user_code=1234567
Waiting for you to complete logging in. You have until yyyy-MM-dd hh:mm:ss
.

Complete your login before the time indicated.

Afterwards, the script should print the information from your Tado home.

If using the token_file, the next time you should not have to sign in.

Examples

An example script is provided in the repository as example.py. It shows you how to use the library and expose some structured responses. A more detailed example is available in libtado/__main__.py.

Supported version and deprecations

Python

Python version Supported versions
3.7 2.0.0 > 3.6.x
3.8 3.7.0 > latest
3.9 3.7.0 > latest
3.10 3.7.0 > latest
3.11 3.7.0 > latest
3.12 3.7.0 > latest
3.13 3.7.0 > latest
3.14 3.7.0 > latest

Contributing

We thank everyone for their help and contributions to the library.

You want to report a bug? Create an issue

You want to request a feature? Create an issue

You want to contribute to the library? Read the Contributing page.

Metadata

Release files for libtado 4.3.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 libtado 4.3.1
File Size Uploaded
libtado-4.3.1.tar.gz 441.4 kB Details

Built distribution (wheel)

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

Total release size: 482.6 kB

Release files / libtado-4.3.1.tar.gz

Download URL libtado-4.3.1.tar.gz
Size 441.4 kB
Tags Source
SHA-256 checksum
How to use checksums
86725b552962abc141aeca138ffa4f58d53f64fff1a3ea42743cd51ae5db80b1
BLAKE2b-256 checksum
How to use checksums
4f635d9b22c45fdc88c4cb9fa11216185a0a034de2a47c5cd88d4d11c4411e3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / libtado-4.3.1-py3-none-any.whl

Download URL libtado-4.3.1-py3-none-any.whl
Size 41.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ccaa376e155080f7e7979fbc5d3224119a7153dc9813eccadb8397f6454f74ce
BLAKE2b-256 checksum
How to use checksums
4ef38674637e1d9cd6fe24860c76457dbe8704cc36f480979fe30504ed7682d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

4.3.1 This release

2 release files

4.3.0

2 release files

4.2.0

2 release files

4.1.2

2 release files

4.1.1

2 release files

4.1.0

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.7.16

2 release files

3.7.9

2 release files

3.7.8

2 release files

3.7.7

2 release files

3.7.6

2 release files

3.7.5

2 release files

3.7.4

2 release files

3.7.3

2 release files

3.7.2

2 release files

3.7.1

2 release files

3.7.0

2 release files

3.6.0

2 release files

3.5.1

2 release files

3.4.1

2 release files

3.2.5

2 release files

3.2.4

2 release files

3.2.3

2 release files

3.2.2

2 release files

3.2.1

2 release files

3.1.1

2 release files

3.0.2

1 release file

3.0.1

1 release file

0.0.1

2 release files

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