Skip to main content

An API client for the Airobot Thermostat local API

Project description

Python Airobot API client

A simple Python API client for interacting with Airobot smart thermostats.

Installing

Install with pip

pip install airobot_api_client

Usage

There are two versions of the client available. Synchronous and asynchrounous.

Sync version

from airobot_api_client.api import AirobotAPI
from airobot_api_client.models import ThermostatSettingsUpdateInput

api = AirobotAPI(<THERMOSTAT_IP>, <USERNAME>, <PASSWORD>)

settings = api.get_settings()
status = api.get_status()

new_settings = ThermostatSettingsUpdateInput(BOOST=True)
updated_settings = api.set_settings(new_settings)

Async version

import asyncio
from airobot_api_client.async_api import AsyncAirobotAPI
from airobot_api_client.models import ThermostatSettingsUpdateInput

async def async_main():
    async with AsyncAirobotAPI(<THERMOSTAT_IP>, <USERNAME>, <PASSWORD>) as api:

        settings = await api.get_settings()
        status = await api.get_status()

        new_settings = ThermostatSettingsUpdateInput(BOOST=True)
        updated_settings = await api.set_settings(new_settings)

asyncio.run(async_main())

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

airobot_api_client-0.3.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airobot_api_client-0.3.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: airobot_api_client-0.3.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for airobot_api_client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 433531a380d77903d0e9631eae19854269b166ee29665bd482f55b6007be3122
MD5 a1ed67f1abf36b33e724388703c16aad
BLAKE2b-256 bc6f56fe488caeff38fee3caf71e8006644e176f75d5cc1746d164865db1d4f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for airobot_api_client-0.3.0.tar.gz:

Publisher: pip_publish.yml on aparelo/airobot_api_client_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for airobot_api_client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd8db130091ed4749969172842a76c1a663749df2171151f312b84fbd78cb3ae
MD5 26295000716622cc77c1681fd3167922
BLAKE2b-256 a6dd2493caaff25534ec20fcc29ca73b6c1de48212390bf27c3eb4c8cc1797c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for airobot_api_client-0.3.0-py3-none-any.whl:

Publisher: pip_publish.yml on aparelo/airobot_api_client_python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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