A method for water-saving is presented in this paper. The proposed method is based on an electro mechanical approach and embedded system that is described mathematically. It describes a solution for water-saving in buildings by giving the ability to ensure that treasurer of water will never be empty before the maximum time T that the owner gives to the treasurer when it is filled with water. The rate of water pumped is altered based on water consumed at tr. Where tr is a random number generated by system. Simulation results in the last section shows that the method can save the water with different maximum time decided by the owner.