|
41 | 41 | from pyshark.capture.live_capture import LiveCapture, UnknownInterfaceException # type: ignore |
42 | 42 | from pyshark.packet.packet import Packet # type: ignore |
43 | 43 |
|
44 | | -from roborock import SHORT_MODEL_TO_ENUM, DeviceFeatures, RoborockCommand, RoborockException |
| 44 | +from roborock import SHORT_MODEL_TO_ENUM, RoborockCommand, RoborockException |
45 | 45 | from roborock.containers import CombinedMapInfo, DeviceData, HomeData, NetworkInfo, RoborockBase, UserData |
| 46 | +from roborock.device_features import DeviceFeatures |
46 | 47 | from roborock.devices.cache import Cache, CacheData |
47 | 48 | from roborock.devices.device import RoborockDevice |
48 | 49 | from roborock.devices.device_manager import DeviceManager, create_device_manager, create_home_data_api |
@@ -541,6 +542,16 @@ async def rooms(ctx, device_id: str): |
541 | 542 | await _display_v1_trait(context, device_id, lambda v1: v1.rooms) |
542 | 543 |
|
543 | 544 |
|
| 545 | +@session.command() |
| 546 | +@click.option("--device_id", required=True) |
| 547 | +@click.pass_context |
| 548 | +@async_command |
| 549 | +async def features(ctx, device_id: str): |
| 550 | + """Get device room mapping info.""" |
| 551 | + context: RoborockContext = ctx.obj |
| 552 | + await _display_v1_trait(context, device_id, lambda v1: v1.device_features) |
| 553 | + |
| 554 | + |
544 | 555 | @session.command() |
545 | 556 | @click.option("--device_id", required=True) |
546 | 557 | @click.option("--refresh", is_flag=True, default=False, help="Refresh status before discovery.") |
@@ -825,6 +836,7 @@ def write_markdown_table(product_features: dict[str, dict[str, any]], all_featur |
825 | 836 | cli.add_command(reset_consumable) |
826 | 837 | cli.add_command(rooms) |
827 | 838 | cli.add_command(home) |
| 839 | +cli.add_command(features) |
828 | 840 |
|
829 | 841 |
|
830 | 842 | def main(): |
|
0 commit comments