We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7208e5e commit c0f00f6Copy full SHA for c0f00f6
1 file changed
example.py
@@ -11,7 +11,7 @@
11
async def main():
12
"""Sample code to retrieve the data from an OpenSenseMap station."""
13
async with aiohttp.ClientSession() as session:
14
- station = OpenSenseMap(SENSOR_ID, loop, session)
+ station = OpenSenseMap(SENSOR_ID, session)
15
16
# Print details about the given station
17
await station.get_data()
@@ -26,5 +26,5 @@ async def main():
26
print("Temperature:", station.temperature)
27
28
29
-loop = asyncio.get_event_loop()
30
-loop.run_until_complete(main())
+if __name__ == "__main__":
+ asyncio.run(main())
0 commit comments