Demand-side management (DSM) in response to market-based electricity tariffs can potentially increase the efficiency and reliability of the electric power grid. This study introduces a novel, one-day-ahead DSM framework which optimizes temperature setpoints and battery dispatch in office buildings, subject to a time-varying and/or demand-based electricity tariff. To reflect real world implementation, our framework operates in two-steps. First, during the passive, battery-only DSM optimization, historical weather and electricity load data for a given building are used to determine its optimal battery capacity. Second, once the battery has been installed, a one-day-ahead, real-time DSM algorithm optimizes both the building’s daily temperature setpoints and the battery's charge/discharge pattern. The optimization objective is to minimize the total operating cost (tariff charges and battery system) while still satisfying occupants’ thermal comfort. Using a case study with a medium-fidelity electric load model for a standard office building, the performance of the proposed framework is validated by quantifying savings in operating cost, reduction of monthly grid peak loads, and the achieved human occupant comfort. To illustrate the advantage of optimizing temperature setpoints and battery dispatch concurrently, the combined performance is compared with that achieved by standalone DSM (i.e., using only battery dispatch or only temperature setpoints). We found that concurrent optimization can reduce a building's monthly peak demand on the grid by up to 26%. Electricity tariff charges are reduced by 11%, more than is required to offset storage costs, thus providing an overall profit to building operators who use such DSM. Payback time is approximately 5 years.