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
39
39
40
40
from pyoverkiz.const import SUPPORTED_SERVERS
41
41
from pyoverkiz.client import OverkizClient
42
+ from aiohttp import ClientSession
42
43
43
44
USERNAME = " "
44
45
PASSWORD = " "
45
46
47
+
46
48
async 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:
48
53
try :
49
54
await client.login()
50
55
except Exception as exception: # pylint: disable=broad-except
@@ -63,6 +68,8 @@ async def main() -> None:
63
68
64
69
time.sleep(2 )
65
70
71
+
72
+ asyncio.run(main())
66
73
asyncio.run(main())
67
74
```
68
75
You can’t perform that action at this time.
0 commit comments