Skip to content

Commit 06f410f

Browse files
Update to version 0.1.10
Adding commands
1 parent f252679 commit 06f410f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "python-roborock"
3-
version = "0.1.9"
3+
version = "0.1.10"
44
description = ""
55
authors = ["humbertogontijo <[email protected]>"]
66
license = "GPL-3.0-only"

roborock/cli.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ async def list_devices(ctx):
100100
click.echo(f"Known devices {', '.join([device.name for device in home_data.devices + home_data.received_devices])}")
101101

102102
@click.command()
103+
@click.option("--cmd", required=True)
104+
@click.option("--params", required=False)
103105
@click.pass_context
104106
@run_sync()
105-
async def get_status(ctx):
107+
async def command(ctx, cmd, params):
106108
context: RoborockContext = ctx.obj
107109
login_data = context.login_data()
108110
if not login_data.home_data:
@@ -121,14 +123,14 @@ async def get_status(ctx):
121123
)
122124
device_map[device.duid] = RoborockDeviceInfo(device, product)
123125
mqtt_client = RoborockMqttClient(login_data.user_data, device_map)
124-
await mqtt_client.get_status(home_data.devices[0].duid)
126+
await mqtt_client.send_command(home_data.devices[0].duid, cmd, params)
125127
mqtt_client.__del__()
126128

127129

128130
cli.add_command(login)
129131
cli.add_command(discover)
130132
cli.add_command(list_devices)
131-
cli.add_command(get_status)
133+
cli.add_command(command)
132134

133135

134136
def main():

roborock/typing.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class RoborockCommand(str, Enum):
2525
APP_CHARGE = "app_charge",
2626
APP_SPOT = "app_spot",
2727
FIND_ME = "find_me",
28+
RESUME_ZONED_CLEAN = "resume_zoned_clean",
29+
RESUME_SEGMENT_CLEAN = "resume_segment_clean",
2830
SET_CUSTOM_MODE = "set_custom_mode",
2931
SET_MOP_MODE = "set_mop_mode",
3032
SET_WATER_BOX_CUSTOM_MODE = "set_water_box_custom_mode",

0 commit comments

Comments
 (0)