Skip to main content

Async client for the EvolvIOT Home Assistant API

Project description

pyevolviot

Async Python client for the EvolvIOT Home Assistant API.

pyevolviot contains the EvolvIOT cloud and local device communication code used by the Home Assistant EvolvIOT integration. It provides an aiohttp-based client for validating credentials, exchanging OAuth/device authorization tokens, reading device state, sending cloud commands, and sending signed local device commands.

Installation

python -m pip install pyevolviot

Requirements

  • Python 3.12 or newer
  • aiohttp
  • cryptography

Usage

from aiohttp import ClientSession

from pyevolviot import EvolvIOTApi


async def main() -> None:
    async with ClientSession() as session:
        api = EvolvIOTApi(
            session,
            "https://api.evolviot.com",
            access_token="ACCESS_TOKEN",
        )

        devices = await api.async_get_devices()
        states = await api.async_get_states()

        print(devices)
        print(states)

API Overview

The main entry point is pyevolviot.EvolvIOTApi.

Cloud methods:

  • async_validate()
  • async_health()
  • async_get_devices()
  • async_get_states()
  • async_get_state(entity_id)
  • async_command(entity_id, payload)
  • async_exchange_authorization_code(authorization_code, client_id, client_secret)
  • async_start_device_authorization()
  • async_exchange_device_code(device_code)

Local device methods:

  • async_local_command(...)
  • async_local_status(...)

Development

Create a virtual environment and install the package in editable mode:

python -m venv .venv
python -m pip install -e . pytest pytest-asyncio ruff build twine

Run checks:

python -m pytest
python -m ruff check src tests
python -m ruff format --check src tests
python -m build
python -m twine check dist/*

License

Apache-2.0

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

pyevolviot-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

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

pyevolviot-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file pyevolviot-0.1.0.tar.gz.

File metadata

  • Download URL: pyevolviot-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pyevolviot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1aadb65cc95e029a6ddcec449045de604ad1cee8adceda3ee7e80c8bd3d42141
MD5 b683288db62e8d0103a500582d5e3e38
BLAKE2b-256 245fed83a9d3996b795f8696d3a7cd287109d65c2e75dd7a36b8d3d3c3904e97

See more details on using hashes here.

File details

Details for the file pyevolviot-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyevolviot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for pyevolviot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8011291c0699033710f42a575266e348120cbfa3b7afc3146cb372391b9e8377
MD5 d2e28a48f4878e62eb09ad9142e6e612
BLAKE2b-256 8fc41db4b12c10764360bc0e5dc241930cdebedd404a5b408e363b67105440e8

See more details on using hashes here.

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