PyTado -- Pythonize your central heating

PyTado is a Python module implementing an interface to the Tado web API. It allows a user to interact with their
Tado heating system for the purposes of monitoring or controlling their heating system, beyond what Tado themselves
currently offer.
It is hoped that this module might be used by those who wish to tweak their Tado systems, and further optimise their
heating setups.
Original author: Chris Jewell chrism0dwk@gmail.com
Licence: GPL v3
Copyright: Chris Jewell 2016-2018
Disclaimer
Besides owning a Tado system, I have no connection with the Tado company themselves. PyTado was created for my own use,
and for others who may wish to experiment with personal Internet of Things systems. I receive no help (financial or
otherwise) from Tado, and have no business interest with them. This software is provided without warranty, according to
the GNU Public Licence version 3, and should therefore not be used where it may endanger life, financial stakes, or
cause discomfort and inconvenience to others.
Example basic usage
>>> from PyTado.interface import Tado
>>> t = Tado('my@username.com', 'mypassword')
>>> climate = t.get_climate(zone=1)
Usage
"""Example client for PyTado"""
from PyTado.interface.interface import Tado
def main() -> None:
"""Retrieve all zones, once successfully logged in"""
tado = Tado(username="mail@email.com", password="password")
zones = tado.get_zones()
print(zones)
if __name__ == "__main__":
main()
Note: for developers, you can create an example_dev.py
file in the root of the project to test your changes. This file will be ignored by the .gitignore
file.
Contributing
We are very open to the community's contributions - be it a quick fix of a typo, or a completely new feature!
You don't need to be a Python expert to provide meaningful improvements. To learn how to get started, check out our
Contributor Guidelines first, and ask for help
in GitHub Discussions if you have questions.
Development
We welcome external contributions, even though the project was initially intended for personal use. If you think some
parts could be exposed with a more generic interface, please open a GitHub issue
to discuss your suggestion.
Dev Environment
To contribute to this repository, you should first clone your fork and then setup your development environment. Clone
your repository as follows (replace yourusername with your GitHub account name):
git clone https://github.com/yourusername/PyTado.git
cd PyTado
Then, to create your development environment and install the project with its dependencies, execute the following
commands in your terminal:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -e '.[all]'
pre-commit install
Coding Guidelines
To maintain a consistent codebase, we utilize black. Consistency is crucial as it helps readability, reduces errors,
and facilitates collaboration among developers.
To ensure that every commit adheres to our coding standards, we've integrated pre-commit hooks. These hooks
automatically run black
before each commit, ensuring that all code changes are automatically checked and formatted.
For details on how to set up your development environment to make use of these hooks, please refer to the
Development section of our documentation.
Testing
Ensuring the robustness and reliability of our code is paramount. Therefore, all contributions must include at least one
test to verify the intended behavior.
To run tests locally, execute the test suite using pytest
with the following command:
pytest tests/ --cov --cov-branch -vv
A message from the original author:
This software is at a purely experimental stage. If you're interested and can write Python, clone the Github repo,
drop me a line, and get involved!
Best wishes and a warm winter to all!
Chris Jewell