Sensor in if