File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -39,12 +39,17 @@ import time
3939
4040from pyoverkiz.const import SUPPORTED_SERVERS
4141from pyoverkiz.client import OverkizClient
42+ from aiohttp import ClientSession
4243
4344USERNAME = " "
4445PASSWORD = " "
4546
47+
4648async def main () -> None :
47- async with OverkizClient(USERNAME , PASSWORD , server = SUPPORTED_SERVERS [" somfy_europe" ]) as client:
49+
50+ session = ClientSession()
51+ server = SUPPORTED_SERVERS [" somfy_europe" ](session)
52+ async with OverkizClient(USERNAME , PASSWORD , server = server) as client:
4853 try :
4954 await client.login()
5055 except Exception as exception: # pylint: disable=broad-except
@@ -63,6 +68,8 @@ async def main() -> None:
6368
6469 time.sleep(2 )
6570
71+
72+ asyncio.run(main())
6673asyncio.run(main())
6774```
6875
You can’t perform that action at this time.
0 commit comments