Skip to main content

A Python client for Themo smart thermostats

Project description

pythemo - Python Themo API Client

The pythemo repository provides a Python client for interacting with the Themo API. This library allows you to authenticate, fetch, and control devices associated with your Themo account.

Features

  • Authentication: Authenticate with the Themo API using your username and password.
  • Device Information: Fetch all devices associated with your account.
  • Control Devices: Control device attributes like lights, temperature, mode, and schedules.

File Descriptions

models.py

The models.py file contains the Device class which represents a Themo device. This class provides:

  • Initialization of the device with its ID and token.
  • Methods to fetch and update the device state and attributes.
  • Methods to control the device, including setting lights, temperature, mode, and schedules.

client.py

The client.py file contains the ThemoClient class which is responsible for:

  • Authenticating the user and obtaining the access token.
  • Fetching the client ID.
  • Fetching all devices associated with the user's account.
  • Closing the client session.

Usage

To use this library, you need to:

  1. Create an instance of the ThemoClient class using your Themo account credentials (username and password).
  2. Call the authenticate() method to obtain the access token.
  3. Fetch devices using the get_all_devices() method.
  4. For each device, you can fetch and update its state, control its attributes, and manage its schedules using methods provided in the Device class.

Dependencies

  • httpx: A fully featured HTTP client for Python 3.

Contributions

Contributions to the pythemo repository are welcome. Please ensure that you follow the coding conventions and write tests for any new features or changes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythemo-0.3.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

pythemo-0.3.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file pythemo-0.3.0.tar.gz.

File metadata

  • Download URL: pythemo-0.3.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pythemo-0.3.0.tar.gz
Algorithm Hash digest
SHA256 27e2252519bc4141f1797c3e9b8799c315e1359874ba5845eda7e463bdccf72c
MD5 9196d6699da538313187285dfba8288a
BLAKE2b-256 bb164d1557abe13345789d88df66adcd5d360bf538aa20851e191e5486e1f5b8

See more details on using hashes here.

File details

Details for the file pythemo-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pythemo-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.21

File hashes

Hashes for pythemo-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2748fafd1ec6ec5a67559ee3437fa77fbb8b3598da04a40f1bf1b2ecfb696c9d
MD5 051f5c193f8bda7d437e83d0449f896d
BLAKE2b-256 5ce5bb2aee19a7c20b65e3ed01077dbf5ddca77bd1e9b13f3e6ca70462f9e211

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page