Setting Virtual Contact Sensor state via MQTT Command

If anyone is coming across this post as I did trying to do the same thing, I found the following post with an updated smartapp that allows contact sensor state changes. Just tested it and it works great!