diff --git a/roborock/roborock_typing.py b/roborock/roborock_typing.py index 37cdf4d9..da0e5dbc 100644 --- a/roborock/roborock_typing.py +++ b/roborock/roborock_typing.py @@ -29,6 +29,7 @@ class RoborockCommand(str, Enum): APP_RESUME_BUILD_MAP = "app_resume_build_map" APP_RESUME_PATROL = "app_resume_patrol" APP_SEGMENT_CLEAN = "app_segment_clean" + APP_SKIP_CURRENT_CLEANING_AREA = "app_skip_current_cleaning_area" APP_SET_AMETHYST_STATUS = "app_set_amethyst_status" APP_SET_CARPET_DEEP_CLEAN_STATUS = "app_set_carpet_deep_clean_status" APP_SET_CROSS_CARPET_CLEANING_STATUS = "app_set_cross_carpet_cleaning_status" diff --git a/tests/devices/traits/v1/test_command.py b/tests/devices/traits/v1/test_command.py index 972f0615..877f1740 100644 --- a/tests/devices/traits/v1/test_command.py +++ b/tests/devices/traits/v1/test_command.py @@ -59,3 +59,19 @@ async def test_send_command_propagates_exception(command_trait: CommandTrait) -> # Verify the exception is propagated with pytest.raises(RoborockException, match="Communication error"): await command_trait.send(RoborockCommand.APP_START) + + +async def test_send_skip_current_cleaning_area(command_trait: CommandTrait) -> None: + """Test the skip command with the parameters the Roborock app sends.""" + mock_rpc_channel = command_trait._rpc_channel + assert mock_rpc_channel is not None + mock_rpc_channel.send_command.return_value = ["ok"] + params = {"source": 2} + + result = await command_trait.send(RoborockCommand.APP_SKIP_CURRENT_CLEANING_AREA, params) + + assert result == ["ok"] + assert RoborockCommand.APP_SKIP_CURRENT_CLEANING_AREA.value == "app_skip_current_cleaning_area" + mock_rpc_channel.send_command.assert_called_once_with( + RoborockCommand.APP_SKIP_CURRENT_CLEANING_AREA, params=params + )