In the UniFi Controller, head to Settings - Profiles and click "Create New Bandwidth Profile"

Give the new bandwidth profile a name and the desired speeds and click "Apply Changes"

Click the Devices icon and select a device connected to Wi-Fi that should be limited in speed.

Click on the Bandwidth profile dropdown and select the bandwidth profile, then click the Apply Changes button to save the settings.

