diff --git a/README.md b/README.md index 35cc4f1..032ed2d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,6 @@ # pysensibo -asyncio-friendly python API for Sensibo (https://sensibo.com). Requires Python 3.10+ +asyncio-friendly python API for Sensibo (https://sensibo.com). Requires Python 3.11+ + +Package has been made specifically for [Home Assistant](https://www.home-assistant.io/) + +For example usage see test-files diff --git a/setup.py b/setup.py index 47eaf9f..7eabb78 100644 --- a/setup.py +++ b/setup.py @@ -5,16 +5,15 @@ print(find_packages()) setup( name="pysensibo", - version="1.0.31", + version="1.0.32", description="asyncio-friendly python API for Sensibo", long_description="asyncio-friendly python API for Sensibo" - "(https://sensibo.com). Requires Python 3.10+", + "(https://sensibo.com). Requires Python 3.11+", url="https://github.com/andrey-git/pysensibo", license="MIT", classifiers=[ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", ], keywords="Sensibo", diff --git a/test-files/test.py b/test-files/test.py index cd0bb71..de2ac09 100644 --- a/test-files/test.py +++ b/test-files/test.py @@ -1,15 +1,17 @@ -from pysensibo import SensiboClient -import aiohttp +"""Test file for Sensibo.""" +from __future__ import annotations + import asyncio +import aiohttp +from pysensibo import SensiboClient -async def main(loop): - async with aiohttp.ClientSession(loop=loop) as session: - client = SensiboClient("KKL92NKBPPiJJXkoNcgiaM4tIvQbIQ",session) - #location = await client.async_get_locations(["APH4U3Lq3N"]) - #print(location) - devices = await client.async_get_devices_data() - print(devices) +async def main(event_loop): + """Retrieve device information from Sensibo cloud.""" + async with aiohttp.ClientSession(loop=event_loop) as session: + client = SensiboClient("API_KEY",session) + devices = await client.async_get_devices_data() + print(devices) loop = asyncio.get_event_loop() loop.run_until_complete(main(loop))