-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Could you explain how the API could be used, after creating an HttpCam instance?
The methods implement asyncio, how should one proceed? I tried this guide, but to no avail.
Either I get cannot 'yield from' a coroutine object in a non-coroutine generator or <_GatheringFuture pending>. When calling the method itself, I get a <coroutine object Wansview.async_get_night_mode at ...> but I fail to be able to close it and display the message I should get from the called method.
Would this work?
loop = asyncio.get_event_loop()
tasks = [asyncio.ensure_future(cam.async_set_night_mode("auto"))]
loop.run_until_complete(asyncio.wait(tasks))
How does one call these methods correctly, I've never used asyncio before and can't figure it out how to use it in this case. Thank you.
Metadata
Metadata
Assignees
Labels
No labels