In fact, you can’t .sendCommand() to a Contact Item.
Please be aware that there is a fundamental difference between .sendCommand() and .postUpdate() (the former is to, well, send commands, the latter is to set the actual status of the Item.)
While in most cases the status will follow the sent command, it is not recommended to set the status of an Item with .sendCommand() as it’s… no command.
A sent command will result in triggering rules with the received command trigger as well as sending the command to all linked channels. openHAB will by default try to guess the most likely new status and will set the status of the Item accordingly to save some time. However, it will finally get the new status through the linked channels.
An update will result in an update of the status, nothing else.
As a contact Item is to refer to Contacts (at least by meaning), there is simply no command, a contact is not to be controlled from openHAB by definition.
If you have to, it’s simply no contact but a Switch (or a String).
I gave it as an example. Here’s my transformation that doesn’t work for the same reason. I get value from multiple sensors via zigbee getway and process the values using transforms. Here is an example of data from a motion sensor.