Skip to content

Commit cb9a28b

Browse files
committed
Update for async
1 parent bc34498 commit cb9a28b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
Licensed under MIT. All rights reserved.
55
"""
66
import asyncio
7+
78
import aiohttp
89

910
from luftdaten import Luftdaten
1011

1112

12-
@asyncio.coroutine
13-
def main():
13+
async def main():
1414
with aiohttp.ClientSession() as session:
1515
data = Luftdaten(155, loop, session)
16-
yield from data.async_get_data()
16+
await data.async_get_data()
1717

1818
# Print the sensor values
1919
print("Sensor values:", data.values)

0 commit comments

Comments
 (0)