For now I've added a check in the script to see if the parameter should be added in the first place. Working so far but not a fix if I want to update a UDT instance.
# Configure the Tag.
tag = {
"name": tagName,
"typeId" : typeId,
"tagType" : tagType,
"parameters" : {}
}
if BACnet_Device_Num:
tag["parameters"]["BACnet_Device_Num"] = BACnet_Device_Num
Ok, it seems that if I do the update with no parameters then they go back to default.
So I guess if you are wanting to update a UDT and just change some of the parameters, you will need to read them all and write them all back including the ones you are changing and the ones you do not want to change but do not know what they are currently set to.