Skip to content

Commit

Permalink
Merge pull request #53 from andrey-git/1.0.32
Browse files Browse the repository at this point in the history
1.0.32
  • Loading branch information
gjohansson-ST authored Jul 28, 2023
2 parents 963e749 + 6605c8f commit 82088ac
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
20 changes: 11 additions & 9 deletions test-files/test.py
Original file line number Diff line number Diff line change
@@ -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))

0 comments on commit 82088ac

Please sign in to comment.