nordicopen / pyeasee

Easee EV charger API python library
MIT License
39 stars 11 forks source link

CLI usage causes runtime warning #52

Closed BlueAndi closed 3 years ago

BlueAndi commented 3 years ago

OS: Win10 Python: 3.9.4 pyeasee: 0.7.36

sys:1: RuntimeWarning: coroutine 'main' was never awaited

CLI uses main() as entry point, which is defined asynchronous, but the asyncio.run() is outside. Just a rough guess, but shouldn't asyncio.run() be addressed in the entry point too? https://github.com/fondberg/pyeasee/blob/46a46ef7dd9cfba732321d475b7425c960826487/setup.py#L25

olalid commented 3 years ago

Hmm, yes, seems like that is an oversight. Running it like this "python3 -m pyeasee" bypasses this problem (which is what I normally do since I can then get it to run a non-release version). Thanks for pointing it out.

BlueAndi commented 3 years ago

Thanks for pointing it out.

You are welcome. Thanks for providing and maintaining!