The link to the code is in the first post of this thread.
If you haven’t used custom code with SmartThings before, the following will explain the process. It’s pretty straightforward, you’re going to copy the code from the author and then paste it into your own account.