/aioairq

Python library to retrieve data asynchronously from air-Q

Primary LanguagePythonApache License 2.0Apache-2.0

PyPI pyversions PyPI downloads

PyPI package aioairq

Python library for asynchronous data access to local air-Q devices.

Retrieve data from air-Q

At its present state, AirQ requires an aiohttp session to be provided by the user:

import asyncio
import aiohttp
from aioairq import AirQ

ADDRESS = "123ab_air-q.local"
PASSWORD = "airqsetup"

async def main():
    async with aiohttp.ClientSession() as session:
        airq = AirQ(ADDRESS, PASSWORD, session)

        config = await airq.config
        print(f"Available sensors: {config['sensors']}")

        data = await airq.data
        print(f"Momentary data: {data}")

asyncio.run(main())