See Vyndree's Hunter post and mimic her pet attack macro (minus Hunter's Mark of course).

Adopt an assist ot /target focustarget style of targetting.

Hunter's petattack macros and Warlock's petattack macros will be of the same structure.