Total electricity consumption in Japan increased rapidly and the power consumption per household is also continuing to increase. The framework of demand response (DR) to promote the reduction of electricity consumption in the household sector by regulating the price of the electricity will be introduced in the future. In this situation, residents must operate their appliances so as not to affect much to their lifestyles while taking into account the power cost. A home energy management system (HEMS) will have an essential role to control appliances such as air conditioners (ACs), battery energy storage systems (BESSs), electric vehicles (EVs), and heat pump water heaters (HPWHs) and automatically match their operations to the behavior of a resident when the electricity price changes. In this study, a Bayesian network, a fundamental tool of machine learning, is adapted to an HEMS to learn the behavior of the resident and appropriate operations of controllable appliances.