We propose a triplet network architecture combined with a triplet loss function to exploit intrinsic properties of channel state information (CSI). The triplet network is inspired by Siamese networks and contributes towards the efforts of contrastive self-supervised learning for wireless communications. We showed that the proposed approach can provide higher accuracy with less amount of samples for (re-)training, enabling the potential of neural network based localisation for practical implementations in a changing propagation environment. We also investigated the impact of the presence and the absence of line of a sight path in a multi-path channel model. We showed that we can learn a low-dimensional representation of CSI acquired at a massive MIMO base station, which is sufficient to capture multi-path characteristics of the channel and still reveal spatial signature of the unknown transmitter.