How can thermal storage be integrated with building management systems (BMS) for optimal performance?