Use the free rainwater first: two float switches watch the rain tank, and two valves switch the house over to the borehole tank when it runs low, and back again after the rain. This workbench needs JavaScript.