|We present a framework to mine relations and group variables that represent measurement and status information from sensors and actuators in office buildings. Our work is motivated by the need to manage growing numbers of devices and related automation functions in buildings that are currently often manually commissioned and maintained. Our approach relies on the idea that building variables at the same location will change value in a temporal relation that can be discovered. Based on event sequences derived from various variables and modalities, our approach initially mines temporal association rules and subsequently groups variables. We propose a weighted transitive clustering (WTC) algorithm to automatically group co-located building variables. To validate our approach, we used living-lab office recordings across 14 months from three different office rooms. We compare our approach against a random guess baseline, a hierarchical agglomerative clustering (HAC) approach, and the rules of a manually configured building management system (BMS). We found that within three months of operation, $75%$ of the building variables could be grouped. Our WTC approach outperforms the baseline and HAC. Furthermore, we show that our framework can be used develop different BMS applications, including counting people in building spaces and identifying BMS configuration errors.