There are also irrigation controllers that use a ball valve and will work fine under gravity pressure e.g. raised rain barrel. Powered via battery that lasts months and months. No home assistant of course but water usage can be estimated from expected flow and programming.