Depending on the specifications of your sensor you can use your switch in different environments. An outdoor limit switch for example should have appropriate IP values to withstand the weather.