-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from andrey-git/1.0.32
1.0.32
- Loading branch information
Showing
3 changed files
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |