You first have to determine if the white wire is a neutral or a hot. They could be switching the neutral here, which was done a very long time ago. But seeing that bunch of white wires in the back of the box, the white going to the switch is most likely a hot, but check to make sure. The bottom screw on your switch should be switched power going to the light and the top should be unswitched power and also feeding the other switch in the box. Some motion switches require a neutral and some require just a ground.