neohubapi/test.py

25 lines
456 B
Python
Raw Permalink Normal View History

#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Andrius Štikonas <andrius@stikonas.eu>
# SPDX-License-Identifier: LGPL-3.0-or-later
import asyncio
2020-11-21 10:48:09 +00:00
import datetime
import logging
2020-11-21 10:48:09 +00:00
import neohub
2020-11-21 01:37:39 +00:00
from enums import ScheduleFormat
2020-11-22 10:23:27 +00:00
async def run():
hub = neohub.NeoHub()
2020-11-20 21:41:06 +00:00
await hub.connect()
2020-11-20 23:39:20 +00:00
system = await hub.get_system()
2020-11-22 00:59:22 +00:00
result = await hub.get_zones()
2020-11-20 21:41:06 +00:00
print(result)
2020-11-20 23:17:40 +00:00
logging.basicConfig(level=logging.DEBUG)
asyncio.run(run())