Abstract: The present invention relates to an electronic controller and a computer-implemented method for a water storage system. The water storage system (10) has a storage tank (12) connected to a main energy source (24) and a main water source (14). The electronic controller (22) is provided with at least one sensor (32) to generate a sensor signal representing the state of the water in the storage tank (12). There is also an input device (38) for a user to input a command signal into the controller (22). A processor in the controller (22) receives the sensor signal, command signal, and source information relating to at least one of the main energy source (24) and main water source (14).