<p>A method controls a system that uses an energy source (32) to both heat sanitary water (domestic hot water (DHW)) and control temperature of a habitable space (28). Sanitary water priority (200) is determined (e.g., based upon a difference between a sanitary water temperature setpoint and a first measured temperature). A space conditioning priority (220, 240) is determined (e.g., based upon a difference between a space temperature setpoint and a second measured temperature). The sanitary water priority is compared to the space conditioning priority. Energy is directed from the energy source to heat the sanitary water and/or condition the space based upon the compared priorities.</p>