We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ab2d05 commit 35616d8Copy full SHA for 35616d8
1 file changed
example.py
@@ -0,0 +1,24 @@
1
+"""Sample code to use the wrapper for interacting with the dingz device."""
2
+import asyncio
3
+
4
+from dingz.dingz import Dingz
5
6
+IP_ADDRESS = "192.168.0.103"
7
8
9
+async def main():
10
+ """Sample code to work with a dingz unit."""
11
+ async with Dingz(IP_ADDRESS) as dingz:
12
13
+ # Collect the data of the current state
14
+ await dingz.get_device_info()
15
+ print("Device details:", dingz.device_details)
16
17
+ # Get the temperature
18
+ await dingz.get_temperature()
19
+ print("Temperature:", dingz.temperature)
20
21
22
+if __name__ == "__main__":
23
+ loop = asyncio.get_event_loop()
24
+ loop.run_until_complete(main())
0 commit comments