Skip to content

Commit fddbe50

Browse files
fix: adding scene commands
1 parent 3a7aed5 commit fddbe50

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

roborock/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,10 @@ async def add_value(self, params):
144144
await self._async_value()
145145
return response
146146

147-
async def close_value(self):
147+
async def close_value(self, params=None):
148148
if self.attribute.close_command is None:
149149
raise RoborockException(f"{self.attribute.attribute} have no close command")
150-
response = await self.api._send_command(self.attribute.close_command)
150+
response = await self.api._send_command(self.attribute.close_command, params)
151151
await self._async_value()
152152
return response
153153

roborock/roborock_typing.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ class RoborockCommand(str, Enum):
8787
GET_WASH_TOWEL_MODE = "get_wash_towel_mode"
8888
LOAD_MULTI_MAP = "load_multi_map"
8989
NAME_SEGMENT = "name_segment"
90+
REUNION_SCENES = "reunion_scenes"
9091
RESET_CONSUMABLE = "reset_consumable"
9192
RESUME_SEGMENT_CLEAN = "resume_segment_clean"
9293
RESUME_ZONED_CLEAN = "resume_zoned_clean"
@@ -111,6 +112,8 @@ class RoborockCommand(str, Enum):
111112
SET_IDENTIFY_GROUND_MATERIAL_STATUS = "set_identify_ground_material_status"
112113
SET_LED_STATUS = "set_led_status"
113114
SET_MOP_MODE = "set_mop_mode"
115+
SET_SCENES_SEGMENTS = "set_scenes_segments"
116+
SET_SCENES_ZONES = "set_scenes_zones"
114117
SET_SERVER_TIMER = "set_server_timer"
115118
SET_SMART_WASH_PARAMS = "set_smart_wash_params"
116119
SET_TIMEZONE = "set_timezone"
@@ -232,6 +235,7 @@ class CommandInfo:
232235
RoborockCommand.GET_WASH_TOWEL_MODE: CommandInfo(params=None),
233236
RoborockCommand.LOAD_MULTI_MAP: CommandInfo(params=None),
234237
RoborockCommand.NAME_SEGMENT: CommandInfo(params=None),
238+
RoborockCommand.REUNION_SCENES: CommandInfo(params={"data": [{"tid": "1687830208457"}]}),
235239
RoborockCommand.RESET_CONSUMABLE: CommandInfo(params=None),
236240
RoborockCommand.RESUME_SEGMENT_CLEAN: CommandInfo(params=None),
237241
RoborockCommand.RESUME_ZONED_CLEAN: CommandInfo(params=None),
@@ -275,6 +279,12 @@ class CommandInfo:
275279
RoborockCommand.SET_IDENTIFY_GROUND_MATERIAL_STATUS: CommandInfo(params={"status": 1}),
276280
RoborockCommand.SET_LED_STATUS: CommandInfo(params=[1]),
277281
RoborockCommand.SET_MOP_MODE: CommandInfo(params=None),
282+
RoborockCommand.SET_SCENES_SEGMENTS: CommandInfo(
283+
params={"data": [{"tid": "1687831528786", "segs": [{"sid": 22}, {"sid": 18}]}]}
284+
),
285+
RoborockCommand.SET_SCENES_ZONES: CommandInfo(
286+
params={"data": [{"zones": [{"zid": 0, "range": [27700, 23750, 30850, 26900]}], "tid": "1687831073722"}]}
287+
),
278288
RoborockCommand.SET_SERVER_TIMER: CommandInfo(
279289
params={
280290
"data": [["1687793948482", ["39 12 * * 0,1,2,3,4,5,6", ["start_clean", 106, "0", -1]]]],

0 commit comments

Comments
 (0)