So basically I am trying to write a program that can control a wiz light through a python script. I am using python 3.6 because of other limitations. Here is the link to the pywizlight project that I am using to connect to the wizlight.
https://pypi.org/project/pywizlight/
I understand that the code says that it will only work in python 3.7 and above, however I am wondering if it is possible to make it work in 3.6. I know that it might be hard to test this if you do not have a wiz light (maybe). I get the following error message when I run it:
RuntimeWarning:
coroutine 'wizlight.turn_on' was never awaited`
light.turn_on(PilotBuilder(brightness = 255))
And here is the code:
import pywizlight
import asyncio
from pywizlight import wizlight, PilotBuilder, discovery
async def main():
loop = asyncio.get_event_loop()
task = loop.create_task(turn_off())
await task
async def turn_off():
light = wizlight("ip address of wiz bulb")
light.turn_on(PilotBuilder(brightness = 255))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
Can anyone make it work? I have about a total of 2 braincells, so I cannot.