Skip to content

Commit fb85fc9

Browse files
committed
Move all commands to OverkizServer
1 parent f5b0128 commit fb85fc9

File tree

8 files changed

+469
-538
lines changed

8 files changed

+469
-538
lines changed

README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import asyncio
3838
import time
3939

4040
from pyoverkiz.const import SUPPORTED_SERVERS
41-
from pyoverkiz.client import OverkizClient
4241
from aiohttp import ClientSession
4342

4443
USERNAME = ""
@@ -49,9 +48,9 @@ async def main() -> None:
4948

5049
session = ClientSession()
5150
server = SUPPORTED_SERVERS["somfy_europe"](session)
52-
async with OverkizClient(USERNAME, PASSWORD, server=server) as client:
51+
async with server as client:
5352
try:
54-
await client.login()
53+
await client.login(USERNAME, PASSWORD)
5554
except Exception as exception: # pylint: disable=broad-except
5655
print(exception)
5756
return
@@ -69,7 +68,6 @@ async def main() -> None:
6968
time.sleep(2)
7069

7170

72-
asyncio.run(main())
7371
asyncio.run(main())
7472
```
7573

0 commit comments

Comments
 (0)