We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc34498 commit cb9a28bCopy full SHA for cb9a28b
1 file changed
example.py
@@ -4,16 +4,16 @@
4
Licensed under MIT. All rights reserved.
5
"""
6
import asyncio
7
+
8
import aiohttp
9
10
from luftdaten import Luftdaten
11
12
-@asyncio.coroutine
13
-def main():
+async def main():
14
with aiohttp.ClientSession() as session:
15
data = Luftdaten(155, loop, session)
16
- yield from data.async_get_data()
+ await data.async_get_data()
17
18
# Print the sensor values
19
print("Sensor values:", data.values)
0 commit comments