Some sensors are range sensors. They have some additional settings which are needed to be adjusted. A lower and an upper bound have to be entered.
Then, an element (a sensor or an actuator) attached to the sensor will have an option called "Trigger on states", where one or more states can be selected In the actuator, so it will be triggered depending on a sensor result.