phlyght/test.py

16 lines
343 B
Python
Raw Normal View History

2022-11-28 02:43:36 +00:00
from asyncio import run
from rich import print
from phlyght.api import Router
async def main():
2022-11-28 04:03:57 +00:00
router = Router("TzPrxDf9hyWZoR5jvUaGDZn4Hlxp2XF67ue4ynSI")
2022-11-28 02:43:36 +00:00
lights = await router.get_lights()
2022-11-28 04:03:57 +00:00
for light in lights:
detailed_light = await router.get_light(light_id=str(light.id))
print(detailed_light)
2022-11-28 02:43:36 +00:00
run(main())