sendEvent() / createEvent() Option "translatable"


(Warren) #1

In looking at the DTH docs under sendEvent() and createEvent(), I can see that there are several parameters for the map that you pass into the functions (for example, see: https://docs.smartthings.com/en/latest/device-type-developers-guide/parse.html)

In the docs, there is a documented option called isStateChange and its functionality is clear enough.

However, in some of the stock DTHs, I see the following:

    def eventMap = [
    	name: "presence",
    	value: present ? "present" : "not present",
    	linkText: linkText,
    	descriptionText: descriptionText,
    	translatable: true
		]
	log.debug "Creating presence event: ${device.displayName} ${eventMap.name} is ${eventMap.value}"
	sendEvent(eventMap)

What is “translatable” and how does that differ from the documented isStateChange? I didn’t see any indications that the parameter was changed but then I don’t see any documentation on translatable at all. Anyone have any ideas?


(ActionTiles.com co-founder Terry @ActionTiles; GitHub: @cosmicpuppy) #2

While this is a lazy guess; I have to post it:

It may mean that the message in the event is literally translatable to other written languages. Samsung is a global company and is steadily building out localization and internationalization into their architecture.

(This may or may not be an actual example.)