Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
tetienne committed Feb 14, 2023
1 parent b632423 commit 835e6bb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,17 @@ import time

from pyoverkiz.const import SUPPORTED_SERVERS
from pyoverkiz.client import OverkizClient
from aiohttp import ClientSession

USERNAME = ""
PASSWORD = ""


async def main() -> None:
async with OverkizClient(USERNAME, PASSWORD, server=SUPPORTED_SERVERS["somfy_europe"]) as client:

session = ClientSession()
server = SUPPORTED_SERVERS["somfy_europe"](session)
async with OverkizClient(USERNAME, PASSWORD, server=server) as client:
try:
await client.login()
except Exception as exception: # pylint: disable=broad-except
Expand All @@ -63,6 +68,8 @@ async def main() -> None:

time.sleep(2)


asyncio.run(main())
asyncio.run(main())
```

Expand Down

0 comments on commit 835e6bb

Please sign in to comment.