Skip to content

Commit 75479c8

Browse files
committed
Fix async watthourmeter
1 parent 6ff673e commit 75479c8

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ async def main():
4141

4242
watt = await connection.watthourmeter()
4343
print(watt)
44+
await connection.close()
4445

4546
asyncio.run(main())
4647
```

oligo/asyncio/asynciber.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ async def measurement(self) -> dict:
105105

106106
async def watthourmeter(self) -> float:
107107
"""Returns your current power consumption."""
108-
return await self.measurement()["consumption"]
108+
return (await self.measurement())["consumption"]
109109

110110
async def icpstatus(self) -> bool:
111111
"""Returns the status of your ICP."""

0 commit comments

Comments
 (0)