I think you might be talking about two different things:
-
the data type of the custom attribute, which is defined in the metadata according to your needs, e.g.,
attribute "myFancyCustomAttribute", "string"for a value that accepts string (text) values -
the properties map that gets passed to
sendEvent, the only official documentation we have for which specifies, unhelpfully, that the signature isvoid sendEvent(Map properties)(in their defense, it is under the "Additional to be documented" section). In that regard, it is nearly identical to the SmartThings method of the same name, which they have documented. (The only difference I can remember off the top of my head is that Hubitat doesn't usedisplayed.) Here is a concrete example of a typical Map that you might pass:
sendEvent(name: "level", value: 50, descriptionText: "${device.displayName} level is 50%, unit: "%")