phlyght/test.py

43 lines
1.1 KiB
Python
Raw Normal View History

2022-11-29 23:14:56 +00:00
from asyncio import run, sleep
2022-11-28 02:43:36 +00:00
from phlyght.api import Router
2022-11-28 08:54:10 +00:00
try:
from rich import print # noqa
except ImportError:
...
2022-11-28 02:43:36 +00:00
async def main():
2022-11-29 23:14:56 +00:00
router = Router("ur key")
2022-11-28 10:48:43 +00:00
print(await router.get_lights())
print(await router.get_scenes())
print(await router.get_devices())
2022-11-29 23:14:56 +00:00
await router.get_rooms()
await router.get_zones()
await router.get_bridge_homes()
await router.get_grouped_lights()
await router.get_bridges()
await router.get_device_powers()
await router.get_zigbee_connectivities()
await router.get_zgb_connectivities()
2022-11-28 10:48:43 +00:00
print(await router.get_motions())
print(await router.get_temperatures())
2022-11-29 23:14:56 +00:00
await router.get_light_levels()
await router.get_buttons()
await router.get_behavior_scripts()
await router.get_behavior_instances()
await router.get_geofence_clients()
await router.get_geolocations()
await router.get_entertainment_configurations()
await router.get_entertainments()
await router.get_homekits()
await router.get_resources()
await router._subscribe()
while True:
await sleep(5)
2022-11-28 02:43:36 +00:00
run(main())