Energy Management Technology that Enables Buildings to Provide Grid Flexibility