Deactivate Hue motion sensor


I managed to get the temperature and motions from my Hue motion sensors. Now I have the idea to deactivate the sensor from time to time. With the iOS App iConnectHue this is possible. For example in the bathroom, if I take a shower.
With the Hue api I found out, that if I deactivate a sensor it changes from
{“state”:{“presence”:false to
So I need help with the js file to create a useful switch. Hope someone can help me with this.