File: example.py

package info (click to toggle)
python-aioskybell 23.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: python: 1,422; makefile: 22
file content (16 lines) | stat: -rw-r--r-- 439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Example usage of aioskybell."""
import asyncio

from aioskybell import Skybell


async def async_example():
    """Example usage of aioskybell."""
    async with Skybell(username="user", password="password") as client:
        devices = await client.async_initialize()
        for device in devices:
            await device.async_update()
            print(device.status)


asyncio.get_event_loop().run_until_complete(async_example())