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.2.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.2.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: airobot_api_client-0.2.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.2.0.tar.gz
Algorithm Hash digest
SHA256 31432452a675ed9964b7f93f791290b34f7bdcf7c4df7f3d1d04de2fe52d3baa
MD5 a5113595a6ec80b8b625afeae972697e
BLAKE2b-256 28d7e780e4dc67fe5623b450bb34b93503cf8dbfa6df1e59ff8adbe66039dc95

See more details on using hashes here.

Provenance

The following attestation bundles were made for airobot_api_client-0.2.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.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for airobot_api_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2542942a9f5cbdf3f1ee544db57ce3313be4fff1259a80a5c93a1326f0360d92
MD5 240eea9ad0f49d96819692f504746db5
BLAKE2b-256 6d5c5e86a12d04b4d0c9d4a726fe2b92e3e8d42b9667a932c09f1dd29829515a

See more details on using hashes here.

Provenance

The following attestation bundles were made for airobot_api_client-0.2.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