You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Get all vacuum devices that support the v1 PropertiesApi
52
+
# Get all vacuum devices. Each device generation has different capabilities
53
+
# and APIs available so to find vacuums we filter by the v1 PropertiesApi.
50
54
for device in devices:
51
55
ifnot device.v1_properties:
52
56
continue
53
57
54
-
# Refresh the current device status
58
+
# The PropertiesAPI has traits different device commands such as getting
59
+
# status, sending clean commands, etc. For this example we send a
60
+
# command to refresh the current device status.
55
61
status_trait = device.v1_properties.status
56
62
await status_trait.refresh()
57
63
print(status_trait)
58
64
59
65
asyncio.run(main())
60
66
```
61
67
62
-
See [examples/example.py](examples/example.py) for a more full featured example
63
-
that has performance improvements to cache cloud information to prefer
64
-
connections over the local network.
68
+
69
+
## Functionality
70
+
71
+
The library interacts with devices through specific API properties based on the device protocol:
72
+
73
+
***Standard Vacuums (V1 Protocol)**: Most robot vacuums use this. Interaction is done through `device.v1_properties`, which contains traits like `status`, `consumables`, and `maps`. Use the `command` trait for actions like starting or stopping cleaning.
74
+
***Wet/Dry Vacuums & Washing Machines (A01 Protocol)**: Devices like the Dyad and Zeo use this. Interaction is done through `device.a01_properties` using `query_values()` and `set_value()`.
75
+
76
+
You can find detailed documentation for [Devices](https://python-roborock.github.io/python-roborock/roborock/devices/device.html) and [Traits](https://python-roborock.github.io/python-roborock/roborock/devices/traits.html).
77
+
65
78
66
79
## Supported devices
67
80
@@ -70,6 +83,7 @@ You can find what devices are supported
70
83
Please note this may not immediately contain the latest devices.
71
84
72
85
73
-
## Credits
86
+
## Acknowledgements
74
87
75
-
Thanks @rovo89 for https://gist.github.com/rovo89/dff47ed19fca0dfdda77503e66c2b7c7 And thanks @PiotrMachowski for https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor
88
+
* Thanks to [@rovo89](https://github.com/rovo89) for [Login APIs gist](https://gist.github.com/rovo89/dff47ed19fca0dfdda77503e66c2b7c7).
89
+
* Thanks to [@PiotrMachowski](https://github.com/PiotrMachowski) for [Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor](https://github.com/PiotrMachowski/Home-Assistant-custom-components-Xiaomi-Cloud-Map-Extractor).
0 commit comments