Skip to content

Commit

Permalink
use asyncio.run
Browse files Browse the repository at this point in the history
  • Loading branch information
yozik04 committed Jan 8, 2024
1 parent 43a5f93 commit 547620a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def run():
await client.set_profile(PROFILE.EXTRA, 120) # EXTRA mode for 120 min
await client.set_profile(PROFILE.EXTRA, 65535) # EXTRA mode, never TIMEOUT

asyncio.get_event_loop().run_until_complete(run())
asyncio.run(run())
```

## Metrics
Expand All @@ -113,7 +113,7 @@ async def run():
from pprint import pprint
pprint(metrics)

asyncio.get_event_loop().run_until_complete(run())
asyncio.run(run())
```

Or if you want just a subset of metrics:
Expand All @@ -134,7 +134,7 @@ async def run():

from pprint import pprint
pprint(metrics)
asyncio.get_event_loop().run_until_complete(run())
asyncio.run(run())
```

## Reading historical data
Expand All @@ -151,7 +151,7 @@ async def run():

from pprint import pprint
pprint(data)
asyncio.get_event_loop().run_until_complete(run())
asyncio.run(run())
```

## Setting values
Expand Down Expand Up @@ -200,7 +200,7 @@ async def run():
'A_CYC_FIREPLACE_TIMER': 15, #Minutes
})

asyncio.get_event_loop().run_until_complete(run())
asyncio.run(run())
```

Not all addresses are settable.
Expand Down

0 comments on commit 547620a

Please sign in to comment.