  Buildings are a promising source of flexibility for the application of demand
response. In this work, we introduce a novel battery model formulation to
capture the state evolution of a single building. Being fully data-driven, the
battery model identification requires one dataset from a period of nominal
controller operation, and one from a period with flexibility requests, without
making any assumptions on the underlying controller structure. We consider
parameter uncertainty in the model formulation and show how to use risk
measures to encode risk preferences of the user in robust uncertainty sets.
Finally, we demonstrate the uncertainty-aware prediction of flexibility
envelopes for a building simulation model from the Python library Energym.
