This paper presents the principles of a Home Automation System dedicated to power management that adapts power consumption to available power ressources according to user comfort and cost criteria. The system relies on a multi-agent paradigm. Each agent, supporting a type of service achieved by one or several devices, cooperates and coordinates its action with others in order to find an acceptable near-optimal solution. The control algorithm is decomposed into two complementary mechanisms: a reactive mechanism, which protects from constraint violations, and an anticipation mechanism, which computes a predicted plan of global consumption according to predicted productions and consumptions and to user criteria. The paper presents a design for the Multi Agent Home Automation System.