Abstract: A method for controlling a power supply system (10) supplying power to a power consuming device (17). The system comprising a climate-dependent source (5, 6) of electrical energy, an auxiliary source (7) of electrical energy, and an energy storage device (14) for storing electrical energy. The climate-dependent source and the energy storage device being connectable to the power consuming device (17). The method comprising acquiring (101) power consumption data indicative of expected future power consumption of the power consuming device (17), energy storage data indicative of a current energy storage level of the energy storage device (14), and power supply data indicative of a current supply of electrical power from the climate-dependent source (5, 6). Determining (102), based on the power consumption data, energy storage data and power supply data, an energy storage threshold level at which electrical energy should be supplied to the energy storage device (14).