A method for operating an energy storage device having at least one energy supply branch connected in parallel with an electrical machine, each energy supply branch having one or more first energy storage modules and one or more second energy storage modules connected in series, wherein the first energy storage modules and second energy storage modules each have (i) an energy storage cell module having at least one energy storage cell, and (ii) a coupling device configured to selectively connect the energy storage cell module into a respective energy supply branch and to selectively bridge the energy storage cell module, wherein the second energy storage modules each further have a cooling element for the at least one energy storage cell, and wherein the cooling element is configured to cool the at least one energy storage cell based upon a control signal from a cooling control device, comprising:
- detecting temperatures of the energy storage cells of the energy storage device;
- cooling the energy storage cells of the second energy storage modules of each energy supply branch with the cooling elements when a detected temperature for the second energy storage modules exceeds a first temperature threshold value;
- driving the coupling device of the second energy storage modules to generate a supply voltage with the second energy storage modules when a detected temperature for the first energy storage modules exceeds a second temperature threshold value which is greater than the first temperature threshold value;
- and
- disconnecting, at the same time as the driving, the first energy storage modules when the detected temperature for the first energy storage modules exceeds the second temperature threshold value.