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.4.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.4.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: airobot_api_client-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 d423522a192c14c64746481b293bbf75408c23de0c217dd142e4fcf2020bafba
MD5 68dacc2b32fdfdea667b1dc9790191a7
BLAKE2b-256 f74d0fe722b257948742a3bb7b534848012f586cd6bbf5987d11f0e22a110020

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for airobot_api_client-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0fc75ac1fc5054d7023f04b4b19ea23fca8d502f3dcc0969d720c2ebd58e172e
MD5 3dfd709c2e8948b7a9f6473055778028
BLAKE2b-256 620b2ae589846a7ea4c854c2ec17b6ea8b547110a0205f3839cac3ab5a5b15d6

See more details on using hashes here.

Provenance

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