A method for operating a power supply system for powering a plurality of electric power consumers (HH, WP, L) in a building, said power supply system comprising: an energy storage device for storing electrical energy, which is connected to the plurality of electric power consumers (HH, WP, L) via an internal power network of the building; a grid connection point via which the internal power grid is connected to a public power grid and via which electrical power is obtained from the public power grid and/or is fed into the public power grid; a device for determining a power which is currently being absorbed from the public power grid; and a communication device for receiving control signals, the method comprising: - determining the power which is currently being absorbed from the public power grid; - receiving a control signal by means of the communication device; - operating the power supply system in one of at least two operating states as a function of the received control signal, wherein in the first operating state the plurality of electric power consumers (HH, WP, L) is provided with electrical energy from the public power grid without limitation of the power that is absorbed, wherein a first threshold value is predetermined which indicates a maximum power to be obtained from the public power grid, characterized in that: in the second operating state, the plurality of electric power consumers (HH, WP, L) is provided, at least temporarily, with electrical energy from the energy storage device so that the uptake of electrical power from the public power grid, averaged over a specified time interval, is less than the first threshold value; and a second threshold value is specified, which specifies a minimum power to be obtained from the public power grid, and the power supply system is operated in a third operating state in such a way that the uptake of electrical power from the public power grid, averaged over a specified time interval, corresponds at least to the second threshold value. an energy storage device for storing electrical energy, which is connected to the plurality of electric power consumers (HH, WP, L) via an internal power network of the building; a grid connection point via which the internal power grid is connected to a public power grid and via which electrical power is obtained from the public power grid and/or is fed into the public power grid; a device for determining a power which is currently being absorbed from the public power grid; and a communication device for receiving control signals, the method comprising: - determining the power which is currently being absorbed from the public power grid; - receiving a control signal by means of the communication device; - operating the power supply system in one of at least two operating states as a function of the received control signal, wherein - determining the power which is currently being absorbed from the public power grid; - receiving a control signal by means of the communication device; - operating the power supply system in one of at least two operating states as a function of the received control signal, wherein in the first operating state the plurality of electric power consumers (HH, WP, L) is provided with electrical energy from the public power grid without limitation of the power that is absorbed, wherein a first threshold value is predetermined which indicates a maximum power to be obtained from the public power grid, characterized in that: in the second operating state, the plurality of electric power consumers (HH, WP, L) is provided, at least temporarily, with electrical energy from the energy storage device so that the uptake of electrical power from the public power grid, averaged over a specified time interval, is less than the first threshold value; and a second threshold value is specified, which specifies a minimum power to be obtained from the public power grid, and the power supply system is operated in a third operating state in such a way that the uptake of electrical power from the public power grid, averaged over a specified time interval, corresponds at least to the second threshold value. in the second operating state, the plurality of electric power consumers (HH, WP, L) is provided, at least temporarily, with electrical energy from the energy storage device so that the uptake of electrical power from the public power grid, averaged over a specified time interval, is less than the first threshold value; and a second threshold value is specified, which specifies a minimum power to be obtained from the public power grid, and the power supply system is operated in a third operating state in such a way that the uptake of electrical power from the public power grid, averaged over a specified time interval, corresponds at least to the second threshold value.