@yougan ,
Looking first at the syntax, you have an extra bracket before Class

It should be
Patch(
Employee,
Defaults(Employee),
{
Title : "666",
Favoritecolor : {Value : "Orange"},
Class:
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:1,
Value:"Classl"
}
}
)
but that is not the real issue if you are going to be selecting Class from a drop-down or such and then Patching the result back to the SharePoint Lookup column. In its simplest form, if you had a dropdown (I will call it ddClass below) with the Items
Choices([@Employee].Class)
which is the way Power Apps would create it, then your Class part of the Patch would be
Class:
{
'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
Id:ddClass.Selected.Id,
Value:ddClass.Selected.Value
}
If however you have sourced the Items differently, then it gets more complex getting the correct Id to Patch back.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.