Skip to main content

API helper for Advantage Air's MyAir and e-zone API

Reason this release was yanked:

Bugged

Project description

Advantage Air API Wrapper

Get

Returns the current state of all components.

async_get()

Set

Change attributes by sending the updated values to the relevant endpoint.

aircon.async_update_ac(ac: str, data: dict)

Update values on the AC system

aircon.async_update_zone(ac: str, zone: str, data: dict)

Update values on a specific zone

lights.async_update_state(id: str, state: str|bool)

Update the state of a light. off|false = off, on|true = on

lights.async_update_value(id: str, value: int)

Update the brightness of a light, and assumes 0 is off.

things.async_update_value(id: str, value : int|bool)

Update the value of a thing. 0|false = off, 100|true = on

*.async_update(data: dict)

Directly update with data to the endpoint.

Example

import asyncio
import aiohttp
from advantage_air import advantage_air


async def main():
    async with aiohttp.ClientSession() as session:
        aa = advantage_air("192.168.1.24", port=2025, session=session, retry=5)
        if data := await aa.async_get(1):
            print(data)
            aa.aircon.async_update_ac("ac1",{"state": "on"})
            await asyncio.gather(
                aa.aircon.async_update_zone("ac1","z01", {"value": 25}),
                aa.aircon.async_update_zone("ac1","z02", {"value": 50}),
            )

asyncio.run(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

advantage_air-0.4.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

advantage_air-0.4.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file advantage_air-0.4.3.tar.gz.

File metadata

  • Download URL: advantage_air-0.4.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for advantage_air-0.4.3.tar.gz
Algorithm Hash digest
SHA256 5d7a23cf76f6fca05297f44b533e6578582360dd04107e652235386c7c5aa2df
MD5 d6b3cdeb31d10f8144213a2d3274645f
BLAKE2b-256 6b8c982c8e3b3db64103739508cc4cd129cd3ce64284cc1e5ee4e01cc9337060

See more details on using hashes here.

File details

Details for the file advantage_air-0.4.3-py3-none-any.whl.

File metadata

File hashes

Hashes for advantage_air-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cb32552950a6f0147b28f82239fe29facd80accd8da4507ee74773b273c787a7
MD5 ede6ba8a68b30ff143f2d585e9ad4be9
BLAKE2b-256 3096550fc8f4cc90c94a5b8da773c1738dc8248d405941aeeb71ab368b1520ff

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page